Skip to content

Add MyST-Parser and link community files in docs sidebar#835

Open
julianz- wants to merge 1 commit into
cherrypy:mainfrom
julianz-:add-myst-parser
Open

Add MyST-Parser and link community files in docs sidebar#835
julianz- wants to merge 1 commit into
cherrypy:mainfrom
julianz-:add-myst-parser

Conversation

@julianz-

@julianz- julianz- commented Jul 5, 2026

Copy link
Copy Markdown
Member

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?

  • 🐞 bug fix
  • 🐣 feature
  • 📋 docs update
  • 📋 tests/coverage improvement
  • 📋 refactoring
  • 💥 other

📋 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])

  • I wrote descriptive pull request text above
  • I think the code is well written
  • I wrote [good commit messages]
  • I have [squashed related commits together][related squash] after
    the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

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.
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided A mark meaning that a new change log entry is present within the patch. label Jul 5, 2026
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.77%. Comparing base (3937fe1) to head (4d6933a).
✅ All tests successful. No failed tests found.

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     

@webknjaz

webknjaz commented Jul 7, 2026

Copy link
Copy Markdown
Member

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.

Comment thread dependencies/tox-docs.in
furo
myst-parser
sphinx-issues # Sphinx roles providing support for linking GitHub
sphinxcontrib-apidoc >= 0.3.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

@webknjaz webknjaz Jul 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sphinx-issues provides a :pypi: role. Let's try it out:

Suggested change
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also reference said docs via relevant Sphinx roles.

Comment thread docs/index.rst
Comment on lines +18 to +19
Code of Conduct <code_of_conduct>
License <license>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of putting these on the top-level, have the docs under the contrib dir. Just like the guidelines above.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, no need to add explicit titles in two places if they don't differ.

Comment thread docs/license.md
@@ -0,0 +1,4 @@
# License

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/code_of_conduct.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread dependencies/tox-docs.in
sphinx-tabs >= 1.1.0

furo
myst-parser

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've started annotating the direct dep additions w/ their purpose in other projects

Suggested change
myst-parser
myst-parser[linkify] # Markdown documents support w/ in-text link detector

Comment thread docs/conf.py
'sphinx.ext.intersphinx',
# Third-party extensions:
'jaraco.packaging.sphinx',
'myst_parser',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'myst_parser',
'myst_parser', # extended markdown; https://pypi.org/p/myst-parser

Comment thread docs/license.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pyproject.toml

# local
"furo",
"myst-parser",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@webknjaz

webknjaz commented Jul 7, 2026

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided A mark meaning that a new change log entry is present within the patch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants