-
Notifications
You must be signed in to change notification settings - Fork 163
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
docs: Convert to rST, add CI, and fix warnings #1588
Conversation
51ecec2
to
c1411ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested (most of) these in the RTD preview and they look good. Thanks!
There's a lot more in the output of
This doesn't include the link in Displaying multiple trees that's broken (it should be |
Follow-up to ea762db.
This uses a reusable workflow in the nextstrain/.github repo.
c1411ae
to
be8b9b7
Compare
9b1e832
to
5a02608
Compare
This path can be used for files such as custom CSS, but absence of usage results in a build warning which removal gets rid of.
These have been moved since nextstrain/nextstrain.org@8064627. Use HEAD to future-proof for any changes to the default branch name.
The YAML frontmatter was used for an old way of hosting the docs¹. When used with the current docs hosting setup², this syntax results in a Sphinx build "error" (it is rendered with as "title: Changelog"): ERROR: Document or section may not begin with a transition. Using a markdown heading removes the error and allows for intended styling. ¹ https://nextstrain.github.io/auspice/ ² https://docs.nextstrain.org/projects/auspice/en/stable/releases/changelog.html
80610f6
to
f0fda9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - thanks! Only a couple of very minor changes. I read through the rendered docs pages, but I didn't click on every link to test them.
Done using a script (below). Individual tweaks will come in subsequent commits. Skipped narratives files since those are not used in this project. files=( docs/advanced-functionality/drag-drop-csv-tsv.md docs/advanced-functionality/misc.md docs/advanced-functionality/second-trees.md docs/advanced-functionality/view-settings.md docs/customise-client/api.md docs/customise-client/requests.md docs/introduction/how-to-run.md docs/releases/v2.md docs/server/api.md docs/server/authentication.md ) for file in "${files[@]}"; do pandoc -f markdown-smart -t rst-smart --wrap none "$file" > "${file%.md}.rst" rm "$file" done
f0fda9d
to
a178f04
Compare
This fixes these limitations from the MD → rST auto-conversion: 1. It converted internal doc links to external links instead of using the :doc: command. 2. It did not properly link to implicit HTML ID "#anchor" refs. Do that with the :ref: command. 3. It failed to convert lists when there wasn't an empty line preceding the original MD list. 4. It did not take advantage of rST note/warning directives.
The link doesn't work properly since the symlink isn't included in the rST tree. Instead of including the symlink in the rST tree, remove it and reference the file directly.
Previously, there was a docs build warning: WARNING: Could not lex literal_block as "json". Highlighting skipped. This fixes the warning. Pin pygments to a minimum of 2.12.0 since that is the earliest version to support this type of comment¹. ¹ https://pygments.org/docs/changelog/#version-2-12-0
a178f04
to
78b9439
Compare
This should have been a part of 8e07c26, but better late than never. Co-authored-by: James Hadfield <[email protected]>
This looks like a massive PR! Is that all new stuff or did you copy it from somewhere? I like all the documentation improvements, just wondering whether they're new or copied. Ah ok, it's conversion from markdown to rst. Would be good to have the commit names in the PR description - this saves clicks. |
@corneliusroemer sorry, I forgot to update the title with one of the larger changes here (convert to rST). Hopefully it's more clear now.
I'm averse to this because commit names/hashes will change as the PR is refined, and it would be a hassle to update the PR description on every change. It only saves one click to the "commits" tab, which is much more browsable than the static links in the description. |
Description of proposed changes
See commit messages.
Testing