Practical Sphinx¶
Preface¶
Overview of chapters and major parts.
Who is this for¶
Who is this not for¶
Conventions¶
Author’s Note¶
Motivation¶
Make lemonade from lemons
- Research about documentation usefulness
- onboarding
- project useful and used
- reduce the frustration factor
- write good docstrings
- choose good names (no need to save spaces)
Minimalist Guide to Getting Started¶
- quickstart
- cookiecutter
- fork and edit
Install¶
Add content¶
Configure¶
Build¶
Serve¶
Sources¶
What common Markup languages should I use?¶
- reStructuredText
- Markdown
- Jupyter notebooks
- LaTEX
How to decide whether to use reStructuredText or Markdown?¶
Problem¶
Solution¶
Use both.
Discussion¶
I would like to include text quoted from another source. How do I do that?¶
Problem¶
Solution¶
Use >
Discussion¶
Configuration¶
Python code
sources¶
parsers¶
theme¶
copyright, author¶
version¶
- simple
- _version.py
formats¶
- html
- epub
- latex
- man
build on RTD¶
custom theme
epilog¶
print code on pages
Extensions¶
Found confusing when I was getting started.
autodoc¶
go through the docstrings
autosummary¶
goes with autodoc
intersphinx¶
links
mathjax¶
equations
napoleon¶
docstrings
todo¶
not one that I use but some like it
nbsphinx¶
convert notebooks
sphinx gallery¶
plots
write your own extensions¶
Themes¶
alabaster¶
sphinx_rtd_theme¶
built in config in conf.py¶
css¶
templates - jinja¶
Your own theme¶
Thar be dragons.
Testing¶
Serve docs¶
APIS - Javascript and interactivity¶
Resources¶
Motivation¶
- papers academic
- jacob kaplan moss
- anne gentle docs like code
- eric holscher blog
Sources¶
- ReadTheDocs cheatsheet
- GitHub cheatsheet
- rst page
- markdown page
- docutils