Skip to main content

Add support for multiple versions to sphinx

Project description

sphinx-multiversion

Fork of https://github.com/Holzhaus/sphinx-multiversion for the Scylla Project.

Sphinx extension for building self-hosted versioned docs.

Original documentation can be found at: https://holzhaus.github.io/sphinx-multiversion/

Fork additions

Prebuild command

The fork introduces the possibility to run custom commands before building the docs with the option --pre-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 pwd

You can pass multiple commands by adding extra --pre-build tags. The commands run in order, from left to right:

sphinx-multiversion docs build/html --pre-build pwd --pre-build ls

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

Maintenance

This fork will be maintained until https://github.com/Holzhaus/sphinx-multiversion/issues/45 is solved.

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-multiversion-scylla-0.2.10.tar.gz (9.2 kB view details)

Uploaded Source

File details

Details for the file sphinx-multiversion-scylla-0.2.10.tar.gz.

File metadata

  • Download URL: sphinx-multiversion-scylla-0.2.10.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for sphinx-multiversion-scylla-0.2.10.tar.gz
Algorithm Hash digest
SHA256 b54d664ecedcf45b98d6be1e939eac596719daa514e4a35f58d8e6330fb05d22
MD5 e3606e86a7e673357afbdf7293b93f26
BLAKE2b-256 eece084013fdfeea0d05a683aea607c248295aaddd01965196c0b53b04e80ca7

See more details on using hashes here.

Supported by

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