Skip to main content

Sphinx extension to build versionsed docs.

Project description

Python versions supported

Package stability

CI

Documentation Status

License

codestyle

PyPI - Version

PyPI - Downloads

Conda - Version

Anaconda - Downloads

Sphinx extension that allows building versioned docs for self-hosting. Supported on Linux and macOS.

It works by producing docs for all(specified) branches in separate folders and injects a readthedocs-like version selector menu/badge.

This project is a fork of Smile-SA/sphinx-versions with significant changes.

Get started using the documentation

sphinx-versioned-docs in action!

sphinx-rtd-theme with a version selector menu

How to use

sphinx-versioned --help
Usage: sphinx-versioned [OPTIONS]

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --chdir                                        TEXT  Make this the current working directory before running. [default: None]                              │
│ --output                -O                     TEXT  Output directory [default: docs/_build]                                                              │
│ --git-root                                     TEXT  Path to directory in the local repo. Default is CWD.                                                 │
│ --local-conf                                   TEXT  Path to conf.py for sphinx-versions to read config from. [default: docs/conf.py]                     │
│ --reset-intersphinx     -rI                          Reset intersphinx mapping; acts as a patch for issue #17                                             │
│ --sphinx-compatibility  -Sc                          Adds compatibility for older sphinx versions by monkey patching certain functions.                   │
│ --prebuild                    --no-prebuild          Disables the pre-builds; halves the runtime [default: prebuild]                                      │
│ --branches              -b                     TEXT  Build docs for specific branches and tags [default: None]                                            │
│ --main-branch           -m                     TEXT  Main branch to which the top-level `index.html` redirects to. Defaults to `main`. [default: None]    │
│ --quite                       --no-quite             No output from `sphinx` [default: quite]                                                             │
│ --verbose               -v                           Passed directly to sphinx. Specify more than once for more logging in sphinx.                        │
│ --log                   -log                   TEXT  Provide logging level. Example --log debug, default=info [default: info]                             │
│ --force                                              Force branch selection. Use this option to build detached head/commits. [Default: False]             │
│ --help                                               Show this message and exit.                                                                          │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-versioned-docs-1.3.2.tar.gz (343.6 kB view hashes)

Uploaded Source

Built Distribution

sphinx_versioned_docs-1.3.2-py3-none-any.whl (115.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page