Customizing Sphinx: Simple, Normal, and Hard
summary
Shows concrete steps to tweak Sphinx: change conf.py values to alter theme and page width, pass alabaster theme options through theme.conf, drop CSS/JS into a _static directory (use .css_t for templated values), override Jinja2 templates by copying search_box.html into _templates, and install a pip theme like sphinx_bootstrap_theme. Demonstrates building a minimal extension: define a docutils node, a directive, an HTML visitor, and a setup(app) that calls add_node/add_directive and connects events. Tests run with pytest fixtures and the extension renders HTML as expected.
AI-written summary · about
chapters (8)
- 0:00Start
- 6:35B.CHANGE SOVE HTML THENE OPTIONS
- 8:27theme.conf
- 9:10ALABASTER CUSTOMIZATION
- 14:3121. OVERRIDE A TEMPLATE
- 16:23alabaster/layout.html
- 17:37basic/layout.html
- 24:18EXAMPLE: alabaster
related talks
22mStatic Sites with Sphinx and Markdown
29mContinuous Documentation: basics and advanced techniques
01h 06mDocument your code
40mDocumenting Python Code
22mAutomating API Documentation
01h 01mRight the docs
36mBuilding Docs like Code: Continuous Integration for Documentation
43mA11y Need Is Love (But Accessible Docs Help Too)
