-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sections for each recommendation
This is consistent with the existing documentation style guide and a similar Snakemake style guide¹ written by @tsibley. This also allows for the addition of a table of contents, which is done here. I looked into making the section links future-proof to wording changes, however could not find a good solution. The closest is using :ref: roles which adds separately defined links to to the section titles, but those links aren't used by the TOC or header links themselves. ¹ https://github.com/blab/styleguide/blob/6aa5d7aa42acfa97e57a5ee05a4175f158502cac/nextstrain-builds.md
- Loading branch information
Showing
1 changed file
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57fe188
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.
Hmm, I thought there was a way to have this:
and make Sphinx use the explicit
foo
target for the heading instead of auto-generating a target (e.g. asfoo-bar-baz
).57fe188
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.
@tsibley that's what I'm looking for, but I can't figure out how to replace the auto-generated targets used by the TOC and header links. Let me know if you find a solution!
57fe188
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.
Ok, in experimenting and looking at Sphinx's configuration options, it's not doable with just those. I thought it was! But I guess I misremembered
html_permalinks
option or something. It'd be a pretty short docutils transformer, so I went looking for Sphinx extensions. Lo and behold, there's one that does exactly this: sphinx-better-subsection. That led me to the Sphinx issue about these ids.57fe188
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.
I'll incorporate that into our Sphinx theme…
57fe188
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.
nextstrain/sphinx-theme#38