diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..f48c19707 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.8" + +sphinx: + configuration: docs/conf.py + +python: + install: + - requirements: requirements.txt diff --git a/docs/_static/openaps-docs.css b/docs/_static/openaps-docs.css new file mode 100644 index 000000000..7450a8357 --- /dev/null +++ b/docs/_static/openaps-docs.css @@ -0,0 +1,12 @@ +.rst-content pre, +.rst-content div[class^="highlight"] pre, +.rst-content .highlight pre, +.rst-content code.literal, +code.docutils.literal { + background: #e6f4ea; +} + +.wy-side-nav-search, +.wy-nav-top { + background: #2980b9; +} diff --git a/docs/conf.py b/docs/conf.py index a21419c34..e9eabffdd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,6 +24,7 @@ from recommonmark.parser import CommonMarkParser from recommonmark.transform import AutoStructify import alabaster +import sphinx_rtd_theme # -- General configuration ------------------------------------------------ @@ -138,32 +139,14 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# alabaster -theme_github_user = 'openaps' -theme_github_repo = 'docs' -html_theme_options = { - 'show_related': True, - 'github_user': theme_github_user, - 'github_repo': theme_github_repo, - 'logo': 'openaps-logo.png', - # TODO: ???? doesn't work? - 'extra_nav_links': extra_nav_links, -} - -""" -html_theme = 'default' -html_theme_options = { - 'display_github': True, - 'github_user': 'openaps', - 'github_repo': 'docs', -} -import sphinx_rtd_theme -html_theme_path = [sphinx_rtd_theme.get_html_theme_path( )] -""" +# Match the classic Read the Docs rendering used on the published "latest" docs. +html_theme = 'sphinx_rtd_theme' +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [] -# html_theme_path = [alabaster.get_path( )] +# html_theme_path = [] +# html_theme_path = [alabaster.get_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -424,7 +407,11 @@ if on_rtd: rtd_version = os.environ.get('READTHEDOCS_VERSION') hosted_root = 'https://openaps.readthedocs.org/en/%s/' % rtd_version + if rtd_version: + version = rtd_version + release = rtd_version def setup(app): + app.add_stylesheet('openaps-docs.css') app.add_config_value('recommonmark_config', { # 'url_resolver': lambda url: github_doc_root + url, 'url_resolver': lambda url: hosted_root + url + '.html', @@ -433,4 +420,3 @@ def setup(app): 'enable_eval_rst': True, }, True) app.add_transform(AutoStructify) - diff --git a/docs/docs/Build Your Rig/edison-install.md b/docs/docs/Build Your Rig/edison-install.md index 6c3eeb703..d854fab0d 100644 --- a/docs/docs/Build Your Rig/edison-install.md +++ b/docs/docs/Build Your Rig/edison-install.md @@ -19,6 +19,7 @@ The box below is the Bootstrap script, and it will complete steps 2 and 3 for yo ``` #!/bin/bash ( +BRANCH=master dmesg -D echo Scanning for wifi networks: ifup wlan0 @@ -47,13 +48,20 @@ echo -e "\nAttempting to bring up wlan0:\n" ifdown wlan0; ifup wlan0 sleep 10 echo -ne "\nWifi SSID: "; iwgetid -r -sleep 5 -curl https://raw.githubusercontent.com/openaps/oref0/master/bin/openaps-install.sh > /tmp/openaps-install.sh -bash /tmp/openaps-install.sh +echo -e "\nSyncing time:\n" +service ntp stop || true; ntpd -gq; service ntp start || true; date +echo "Press Enter to continue installing the current release ($BRANCH) of oref0," +read -p "or enter the oref0 branch name to install." -r +BRANCH=${REPLY:-$BRANCH} +curl -L https://raw.githubusercontent.com/openaps/oref0/$BRANCH/bin/openaps-install.sh -o /tmp/openaps-install.sh || { + service ntp stop || true; ntpd -gq; service ntp start || true; date + curl -L https://raw.githubusercontent.com/openaps/oref0/$BRANCH/bin/openaps-install.sh -o /tmp/openaps-install.sh +} +bash /tmp/openaps-install.sh $BRANCH ) ``` -Copy all of those lines; go back to Terminal/PuTTY and paste into the command line (Paste in PuTTY is just a right mouse click). Then, hit `enter`. The screenshot below is an example of what the pasted text will look like (highlighted in blue for clarity). *(If you have trouble copying from the box, [click here](https://raw.githubusercontent.com/openaps/oref0/dev/bin/openaps-bootstrap.sh) and ctrl-a or command-a to copy the text from there.)* +Copy all of those lines; go back to Terminal/PuTTY and paste into the command line (Paste in PuTTY is just a right mouse click). Then, hit `enter`. The screenshot below is an example of what the pasted text will look like (highlighted in blue for clarity). ************* Note: **This setup script will require you to have an available working internet connection to be successful.** If anything fails during the installation, the setup may end early before you get to the setup script questions. In that case, you can just paste the script above into the command line again and try again. (Don't try to use the up arrow, it probably won't work.) If you get repeated failures, bring your questions and error messages into Gitter or FB for help with troubleshooting. diff --git a/requirements.txt b/requirements.txt index 48ab9395a..8942ce029 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,8 @@ recommonmark==0.4.0 sphinx==1.5.6 +sphinx_rtd_theme==0.2.4 +alabaster<0.7.13 +Jinja2<3.1 +MarkupSafe<2.1 openaps docutils<0.18