Skip to content

Commit

Permalink
docs: v0.24 platform docs migration (#19)
Browse files Browse the repository at this point in the history
* feat: initial project setup (#2)

* feat: add initial structure

* build: ignore custom sidebar for now

* fix: correct url

* feat: add placehold for main index

* feat: initial import of readme backup (#3)

* docs: import intro section

* docs: update heading levels for intro section

* docs(tutorials): add initial set of imported tutorials

* docs: update toctree in main index

* refactor: move tutorials to subdir

* docs(tutorials): add more imported files

* docs(tutorials): add remaining imported files

* docs(tutorials): update headings

* docs: update headings

* docs: update toctrees

* docs: update headings and toctree for remaining tutorials

* docs: add remaining docs from backup 2023-06-23

No formatting updates

* feat: add script used to rename backup files

* docs(explanations): update headings and add toctree

* docs: fix table formatting

* docs(reference): add toctree and update headings

* docs(protocol-ref): add toctree and update headings

* docs(resources): add toctree and update headings

* chore: fix toctree issue

* fix: install pytz

doesn't build in some cases without this

* docs: misc cleanup (#5)

* chore: remove extraneous files and move unused ones

* chore: exclude other dir

* docs: correct heading levels

* docs: update devcontainer README.md

* docs: link fixes (#4)

* script: add script to update links with first example

* script: add sections and example containing page anchor

* script: make executable

* script: fix another reference link

* script: reference section link fixes

* script: remove dupe line and run on files

verified results

* script: add comment about script

* script: add all directory-specific changes

* script: add updates for remaining links

* docs: links updated by script

* chore: remove extraneous dependency

* chore: update based on current import (#7)

* docs: update explanations from current backup

* docs: update remaining sections from current backup

* fix: correct some json formatting (#8)

* build: update preview url for this repo (#9)

* docs: multi-language code blocks to tabs (#10)

* docs: update multi code block examples

* refactor: switch back to original syntax

* docs: update multi-language code blocks

* docs: update remaining dapi endpoint multi-language blocks

* docs: update more multi-language blocks

* docs: import docsify (dapi-client) (#11)

* docs: import from readme backup

* docs: add toc info and make updates to core section

* docs: update toc to include dapi-client platform info

* docs: add overview heading

* chore: update script to rename files

* docs: refactor slightly

* docs: import docsify sdk docs (#12)

* docs: import docsify sdk docs

* refactor: update rename script and run

* docs: add toctree for examples section

* docs: getting started section added

* docs: rename files

* docs: add headings

* docs: update dash sdk toctree location and content

* docs: minor fixes

* docs: add usage and wallet sections

* docs: update some links from readme.io -> rtd

* docs: update links

* docs: update core links

* docs: update landing page (#13)

* docs: add card grid to landing page

* docs: add labels and fix links on cards

* docs: adjust order of cards

* chore: update block language type and update Core download link

* docs: update index to align with user and core docs

* feat: add main sidebar (#14)

* feat: add static sidebar for main page

* docs: add links to Core and User docs to sidebar

* chore: convert readme blocks to rst compatible format (#15)

* chore: fix some images

* docs: dpns image

* docs: remaining image fixes

* docs: replace remote image with local

* chore: convert param block to table

* docs: comment out some currently unused info

* docs: update youtube embed block

* chore: allow video to be full width

* docs: update some links to internal refs

* feat: add sphinx search (#20)

includes js / css updates to make it work
  • Loading branch information
thephez authored Sep 6, 2023
1 parent 89575d0 commit f10d87a
Show file tree
Hide file tree
Showing 158 changed files with 16,803 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Development Container

The development container config ([.devcontainer.json](./devcontainer.json)) enables starting a
pre-configured [GitHub Codespaces](https://github.com/features/codespaces) environment ready to
build and preview the docs in this repository.

## Building a preview

The current version of the docs will be automatically built the when a new codespace is created. To
re-build the docs after making changes, simply run this command from the terminal:

```shell
rm -rf _build/ && make html
```

Note: you may need go to the main menu, click `View`, then `Terminal` if the terminal isn't visible.

## Viewing the preview

To preview the docs, run the following command in the terminal:

```shell
python -m http.server 8080 -d _build/html
```

This will start a simple Python web server on port 8080 in the codespace and open a preview of the
site in VSCode's built-in simple browser. To preview in your actual browser, click the `PORTS` tab,
right-click on `Doc Preview (8080)`, and select `Open in Browser`.
51 changes: 51 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/python:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommands.sh",

// Configure tool-specific properties.
"customizations": {
"codespaces": {
"openFiles": [
".devcontainer/README.md",
"README.md"
]
},
"vscode": {
"extensions": [
"lextudio.restructuredtext",
"trond-snekvik.simple-rst",
"DavidAnson.vscode-markdownlint",
"ZainChen.json",
"stkb.rewrap"
]
}
},
"portsAttributes": {
"8080": {
"label": "Doc Preview",
"onAutoForward": "openPreview"
}
}

// // Configure command(s) to run after starting
// "postStartCommand": {
// "serve-doc-preview": "python -m http.server 8080 -d _build/html/"
// }

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
10 changes: 10 additions & 0 deletions .devcontainer/postCreateCommands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#/!bin/sh

# Command to run during postCreateCommand
# Done in script because when done via object the commands are run in parallel
# (which isn't always desirable)
# https://containers.dev/implementors/spec/#parallel-exec
# https://containers.dev/implementors/json_reference/#formatting-string-vs-array-properties

pip install -r requirements.txt
make html
23 changes: 23 additions & 0 deletions .github/workflows/preview-url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Add preview URL to PR description
on:
pull_request_target:
types: [opened]
paths:
- '**.md'
- '**.png'
- '**.rst'
- '**.svg'

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: edit-pull-request-description
uses: Jerome1337/[email protected]

env:
GITHUB_TOKEN: ${{ github.token }}
with:
description-message: |
Preview build: https://dash-docs-platform--${{github.event.pull_request.number}}.org.readthedocs.build/en/${{github.event.pull_request.number}}/
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.db
*.exe
_build
**/.DS_Store
.vscode
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD004": { "style": "asterisk"},
"MD013": false,
"MD033": false,
"MD036": false,
"MD040": true,
"MD041": false,
"MD049": true
}
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
11 changes: 11 additions & 0 deletions _static/css/footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Make each footer item in-line so they stack horizontally instead of vertically */
.footer-item {
display: inline-block;
}

/* Add a separating border line for all but the last item */
.footer-item:not(:last-child) {
border-right: 1px solid var(--pst-color-text-base);
margin-right: .5em;
padding-right: .5em;
}
151 changes: 151 additions & 0 deletions _static/css/pydata-overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
/* Update theme variables based on https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html#css-theme-variables */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,600;0,900;1,900&family=Open+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
--dash-blue: #008de4;
--dash-deep-blue: #012060;
--dash-midnight-blue: #0b0f3b;
}

html[data-theme="light"] {
--pst-color-primary:var(--dash-blue);
--pst-color-link:var(--pst-color-primary);
--pst-color-link-hover:var(--dash-deep-blue);
}

html[data-theme="dark"] {
--pst-color-primary:var(--dash-blue);
--pst-color-link:var(--pst-color-primary);
}

html {
/* Headers */
--pst-font-size-h1: 28px;
--pst-font-size-h2: 24px;
--pst-font-size-h3: 20px;

/* Sidebar styles */
--pst-sidebar-font-size: 0.95em;
--pst-sidebar-header-font-size: 1.2em;
}

html[data-theme=dark] .bd-content img:not(.only-dark):not(.dark-light) {
background: none;
border-radius: none;
}

h1,h2,h3,h4,h5,h6{
font-family: 'Montserrat', sans-serif;
font-weight: 600;
}

p, a, li, ol {
font-family: 'Open Sans', sans-serif;
}

p {
font-size: 0.95em;
line-height: 1.5;
}

.sidebar-end-items__item {
position: relative;
}

select {
width: 100%;
padding: 10px;
appearance: none;
background: transparent;
border-radius: 0.25rem;
}

html[data-theme=dark] select {
color: #fff;
}

html[data-theme="light"] select{
color: #000;
}

html[data-theme="light"] {
--table-bg-color-odd: #eeeeee;
--table-bg-color-even: #ffffff;
}

tbody tr:nth-child(odd) { background-color: var(--table-bg-color-odd); }
tbody tr:nth-child(even) { background-color: var(--table-bg-color-even); }

.table thead th.head {
vertical-align: middle;
}

/* These are hacks to hide the pydata-theme search popup behind the readthedocs
sphinx search extension interface.
*/
.search-button__wrapper.show .search-button__search-container,
.search-button__wrapper.show .search-button__overlay {
z-index: 1;
}

.search-button__wrapper.show .search-button__overlay {
display: none;
}

/* Make sure it doesn't stick out on the sides of the RtD search screen */
.search-button__wrapper.show .search-button__search-container {
width: 15%;
}

/* Handle actual styling of the RtD search extension's screen */
.search__outer {
background-color: var(--pst-color-on-background);
border: var(--pst-color-border);
border-radius: 0.25em;
}

.search__outer__input {
background-color: var(--pst-color-on-background);
color: var(--pst-color-text-base);
font-size: var(--pst-font-size-icon);
}

.rtd__search__credits {
background-color: var(--pst-color-background);
color: var(--pst-color-text-muted);
}

.rtd__search__credits a {
color: var(--pst-color-link);
}

.search__result__content, .search__result__subheading, .search__error__box {
color: var(--pst-color-text-base);
}

.search__result__subheading span {
border-bottom-color: var(--pst-color-text-base);
}

[data-theme="dark"] .search__outer .search__result__content span,
[data-theme="dark"] .search__outer .search__result__title span {
background-color: var(--pst-color-muted-highlight); /* Dark mode background color */
}

.search__outer .search__result__content span,
.search__outer .search__result__title span {
border-bottom-color: var(--pst-color-text-base);
}

/* Make sure "X" remains visible */
.search__cross__img {
fill: var(--pst-color-text-base);
}

/* Prevent hover from actually changing the color by setting it to what it
already is */
.outer_div_page_results:hover, .search__result__box .active {
background-color: var(--pst-color-on-background);
}

/* End of styling of the RtD search extension's screen */
Binary file added _static/img/favicon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f10d87a

Please sign in to comment.