Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs development experience #1609

Merged
merged 2 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion DEV_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,24 @@ The main Nextstrain documentation is available at [docs.nextstrain.org](https://

The Auspice technical reference guide is available at [docs.nextstrain.org/projects/auspice](https://docs.nextstrain.org/projects/auspice/en/stable/index.html). That documentation is built from the files in this repo in the `./docs` folder.

To build the Auspice documentation locally, run `npm run build-docs` and open `docs/_build/html/index.html`.
To preview the Auspice documentation locally,

1. Create and activate a Conda environment from `docs/environment.yml`. Example using Mamba:

```bash
mamba env create --file docs/environment.yml
conda activate auspice-docs
```

2. Build the docs from a clean slate.

```bash
make -C docs clean livehtml
```

3. Open the preview link (http://127.0.0.1:8000) in a browser.

Changes to documentation source files (`.md` and `.rst` files under `docs/`) should automatically be reflected upon page refresh.

## Contributing to Internationalization and Localization (i18n/l18n)

Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ help:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

livehtml:
sphinx-autobuild -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ dependencies:
- pip
- pip:
- nextstrain-sphinx-theme>=2022.5
- sphinx-autobuild
- sphinx-markdown-tables
- sphinx-argparse
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"get-data": "env bash ./scripts/get-data.sh",
"heroku-postbuild": "npm run build && npm run get-data",
"gzip-and-upload": "env bash ./scripts/gzip-and-upload.sh",
"build-docs": "cd docs && make clean && make html && echo 'Docs rebuild, open docs/_build/html/index.html'",
"test": "jest test/*.js",
"integration-test": "NODE_ENV=test ENV=dev jest ./test/integration/*.js --config puppeteer.config.js",
"integration-test:ci": "start-server-and-test server http://localhost:4000 integration-test",
Expand Down