Sphinx Serializing HTML Extension

2.0.0 · active · verified Sun Mar 29

sphinxcontrib-serializinghtml is a Sphinx extension that outputs "serialized" HTML files, specifically in JSON and Pickle formats. This enables external applications or custom post-processing tools to consume documentation content without needing to parse raw HTML. The library is currently at version 2.0.0 and follows a release cadence tied to Sphinx releases, with recent updates addressing dependency management and Python/Sphinx version compatibility.

Warnings

Install

Imports

Quickstart

After installing the library, enable it by adding 'sphinxcontrib.serializinghtml' to the 'extensions' list in your Sphinx project's `conf.py`. Then, build your documentation using the 'json' or 'pickle' builder, which are provided by this extension.

# 1. Create a Sphinx project (if you don't have one):
# sphinx-quickstart

# 2. In your conf.py file, add the extension:
# extensions = [
#     'sphinxcontrib.serializinghtml'
# ]

# 3. Build the documentation to JSON or Pickle format:
# From your project root (where Makefile or make.bat is located):
# make json
# or
# make pickle

# Alternatively, using sphinx-build directly:
# sphinx-build -b json -d _build/doctrees . _build/json
# sphinx-build -b pickle -d _build/doctrees . _build/pickle

view raw JSON →