Skip to content

sphinx-vitepressSphinx power, VitePress polish

A Sphinx builder that renders your documentation with VitePress. Keep autodoc, docstrings and intersphinx, lose the dated theme.

sphinx-vitepress ​

sphinx-vitepress is a Sphinx builder that emits VitePress-flavored Markdown, a generated .vitepress/config.mts, and a theme, so an existing Sphinx project becomes a modern documentation site without giving up any of Sphinx’s machinery.

It is the Python counterpart of DocumenterVitepress.jl:

Sphinx : sphinx-vitepress :: Documenter.jl : DocumenterVitepress.jl

Why ​

Sphinx has the best extraction and cross-referencing in any language ecosystem: autodoc reads your code, napoleon understands NumPy and Google docstrings, and intersphinx links a type in your signature to the page that documents it in another project. What it has not had is a front end people enjoy reading.

VitePress supplies that: instant navigation, real search, dark mode. What it does not know is anything about Python. This builder is the join between them.

What you keep ​

Everything on the read side of Sphinx is untouched, because extensions like autodoc and MyST produce a document tree long before any builder runs:

  • conf.py, unchanged apart from optional vitepress_* settings
  • autodoc, autosummary, napoleon, MyST, and most third-party extensions
  • intersphinx in both directions, since your site publishes an objects.inv
  • other Sphinx builders: make latexpdf still works from the same sources