Add MyST-Parser and link community files in docs sidebar#835
Conversation
Add myst-parser to docs dependencies and Sphinx extensions, enabling Markdown support. Link the Code of Conduct and License in the docs sidebar as an initial test of the integration.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #835 +/- ##
==========================================
- Coverage 78.19% 77.77% -0.42%
==========================================
Files 41 41
Lines 4788 4788
Branches 547 547
==========================================
- Hits 3744 3724 -20
- Misses 905 922 +17
- Partials 139 142 +3 |
|
Need to decide how to deal w/ https://github.com/cherrypy/cheroot/actions/runs/28755500504/job/85261942391#step:16:82. I think where were a few toggles in the Sphinx config. One way could be cutting the doc on inclusion. I'd need to check how I used to handle this in other places but if you want to look, the solution is probably in one of sphinx-contrib/towncrier, ansible/pylibssh, ansible/awx-plugins or jazzband/pip-tools. |
| furo | ||
| myst-parser | ||
| sphinx-issues # Sphinx roles providing support for linking GitHub | ||
| sphinxcontrib-apidoc >= 0.3.0 |
There was a problem hiding this comment.
For the future: modern versions of Sphinx can do this natively, we should try to migrate some day.
| @@ -0,0 +1,3 @@ | |||
| Added ``myst-parser`` to enable Markdown support in Sphinx documentation, | |||
There was a problem hiding this comment.
I think sphinx-issues provides a :pypi: role. Let's try it out:
| Added ``myst-parser`` to enable Markdown support in Sphinx documentation, | |
| Added :pypi:`myst-parser` to enable Markdown support in Sphinx documentation, |
| @@ -0,0 +1,3 @@ | |||
| Added ``myst-parser`` to enable Markdown support in Sphinx documentation, | |||
| and linked the Code of Conduct and License in the docs sidebar | |||
There was a problem hiding this comment.
We could also reference said docs via relevant Sphinx roles.
| Code of Conduct <code_of_conduct> | ||
| License <license> |
There was a problem hiding this comment.
Instead of putting these on the top-level, have the docs under the contrib dir. Just like the guidelines above.
There was a problem hiding this comment.
Also, no need to add explicit titles in two places if they don't differ.
| @@ -0,0 +1,4 @@ | |||
| # License | |||
There was a problem hiding this comment.
This breaks the docs build: https://app.readthedocs.org/projects/cheroot/builds/33450467/#328554371--132. There's even not PR preview because the build doesn't complete.
There was a problem hiding this comment.
Is this a symlink? No need to do this. Use the Sphinx-native include role like https://github.com/ansible/pylibssh/blob/0efb3df9a8f1a32ba7ac0c4ee073b950481e0527/docs/contributing/code_of_conduct.rst?plain=1#L1 / https://github.com/ansible/awx-plugins/blob/7c6a7cf97ec1e2ed3c36c0dd2e0dbb29436dea78/docs/contributing/code_of_conduct.md?plain=1#L1
| sphinx-tabs >= 1.1.0 | ||
|
|
||
| furo | ||
| myst-parser |
There was a problem hiding this comment.
I've started annotating the direct dep additions w/ their purpose in other projects
| myst-parser | |
| myst-parser[linkify] # Markdown documents support w/ in-text link detector |
| 'sphinx.ext.intersphinx', | ||
| # Third-party extensions: | ||
| 'jaraco.packaging.sphinx', | ||
| 'myst_parser', |
There was a problem hiding this comment.
| 'myst_parser', | |
| 'myst_parser', # extended markdown; https://pypi.org/p/myst-parser |
There was a problem hiding this comment.
I'm not entirely sure we should be rendering the license text in the docs. A lot of projects just have it in the packaging metadata + GH. But if you fix the build, we could see how it renders, I suppose.
Otherwise, I'd just postpone. Having CoC included should be enough to test how MyST-Parser integrates and would give us the build infra for adding more Markdown separately w/o having to think about the configuration bits.
|
|
||
| # local | ||
| "furo", | ||
| "myst-parser", |
There was a problem hiding this comment.
Let's not include this change. I think we should be able to get rid of the docs extra here as it's an ancient leftover. Try doing so in a separate PR to see if anything depends on this docs extra.
|
I think #828 should be completed first to reduce the amount of noise in CI as it's difficult to sort through the unrelated failures otherwise. |
Add myst-parser to docs dependencies and Sphinx extensions, enabling Markdown support. Link the Code of Conduct and License in the docs sidebar as an initial test of the integration.
❓ What kind of change does this PR introduce?
📋 What is the related issue number (starting with
#)Resolves #
❓ What is the current behavior? (You can also link to an open issue here)
❓ What is the new behavior (if this is a feature change)?
📋 Other information:
📋 Contribution checklist:
(If you're a first-timer, check out
[this guide on making great pull requests][making a lovely PR])
the changes have been approved
and description in grammatically correct, complete sentences