Add support for multiple versions to sphinx
Project description
sphinx-multiversion
Fork of https://github.com/Holzhaus/sphinx-multiversion for the ScyllaDB Project.
Sphinx extension for building self-hosted versioned docs.
Original documentation can be found at: https://holzhaus.github.io/sphinx-multiversion/
Fork additions
Prebuild and postbuild commands
The fork introduces the possibility to run custom commands before and after building the docs with the option --pre-build
and --post-build
.
This could be useful to prepare the docs repository before running sphinx-build
, debug the execution, or even generate versioned documentation using other builders.
For example, imagine that you want to build versioned docs written in Sphinx, but the API reference is generated with JavaDoc. This option enables the generation of both versioned docs to host them under the same folder using GitHub Pages.
Here's an example showing the directory where the build command is running:
sphinx-multiversion docs build/html --pre-build pw
You can pass multiple commands by adding extra --pre-build
or --post-build
options. The commands run in order, from left to right:
sphinx-multiversion docs build/html --pre-build pwd --pre-build ls --post-build "cat file.txt"
Rename latest version URL
The smv_latest_version
setting determines which is the latest version.
Setting this option could be useful to show a warning when users are not reading the latest version.
You can override the latest version output directory with smv_rename_latest_version
.
Here's an example:
smv_latest_version = 'x.y.z' # Use the branch/tag name
smv_rename_latest_version = 'latest' # Use the commit hash
Add support for custom tags
See https://github.com/dgarcia360/sphinx-multiversion/pull/4.
Maintenance
This fork will be maintained until the following issues are solved:
- https://github.com/Holzhaus/sphinx-multiversion/issues/45
- https://github.com/Holzhaus/sphinx-multiversion/issues/65
License
BSD 2-Clause License
Copyright (c) 2020, Jan Holthuis jan.holthuis@ruhr-uni-bochum.de All rights reserved.
Modifications (see "Fork Additions") 2020, David Garcia hi@davidgarcia.dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinx-multiversion-scylla-0.2.14b0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 840c46a9b62fdb83c4732d1e65ae6352d390243b85d31a64654cfbcc7706936f |
|
MD5 | 2f6d3c438b3d25ba80a7e53e5243c91a |
|
BLAKE2b-256 | e405ea3b21ec0903ad684e1a6ac6d5c1753c2fe73f1e1df97254ebb29b859301 |
Hashes for sphinx_multiversion_scylla-0.2.14b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43dbe07c3be1a874363d7bbae9012add010e1e4e20730cb37f5a8c288a5f6ccd |
|
MD5 | c6611058f8663f59b47988f3cbbc2ec5 |
|
BLAKE2b-256 | 5cace5048d24a4fd3c1dac13881cfd3d571a6ff18e04a6b9d3119b73d9c989fa |