sphinx-doc / sphinx-doc/sphinx
Using custom pygments styles
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
There is a lot of conflicting information as to how to add custom pygments styles to Sphinx docs to be found online and in Sphinx theme issues, many of which seem to work for some people and not for others. Therefore, I would like to see an 'officially' recommended method of adding custom pygment styles to Sphinx added to the documentation so that it is very clear and easy to understand how to make a new style override any within the installed theme. Examples would be awesome.
To Reproduce
N/A
Expected behavior
There should be at least one detailed, easily consumable description of how to add custom pygments styles to Sphinx themes included in the official documentation.
Your project
N/A
Screenshots
N/A
Environment info
- OS: Linux Mint v20.1
- Python version: v3.9.3
- Sphinx version: v3.5.3
- Sphinx extensions: sphinx.ext.autodoc, sphinx.ext.autosectionlabel, sphinx.ext.graphviz, sphinx.ext.inheritance_diagram, sphinx.ext.intersphinx, sphinx.ext.ifconfig, sphinx.ext.mathjax, sphinx.ext.napoleon, sphinx.ext.todo]
- Extra tools: N/A
Additional context
A much more detailed explanation of the issue, expectations, and suggested resolution, is located at the original issue on RTD #1124. Please review.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the detailed discussion in the linked Read the Docs theme issue (#1124) and the Sphinx documentation structure to identify the appropriate documentation entry point. Document an officially recommended method for overriding Pygments styles in Sphinx themes, with clear examples, and verify that the guidance explains how custom styles take precedence over installed theme styles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100