Sphinx extension that allows building versioned docs for self-hosting.
- Python 2.7, 3.3, 3.4, and 3.5 supported on Linux and OS X.
- Python 2.7, 3.3, 3.4, and 3.5 supported on Windows (both 32 and 64 bit versions of Python).
📖 Full documentation: https://robpol86.github.io/sphinxcontrib-versioning
Install:
pip install sphinxcontrib-versioningUsage:
sphinx-versioning --help
sphinx-versioning build --help
sphinx-versioning push --helpThis project adheres to Semantic Versioning.
- Added
- Time value of
html_last_updated_fmtwill be the last git commit (authored) date.
- Time value of
- Fixed
- Unhandled KeyError exception when banner main ref fails pre-build.
- sphinx-contrib#26
- sphinx-contrib#27
- Added
- Windows support.
- Fixed
- Fixed
- banner.css being overridden by conf.py: sphinx-contrib#23
- Fixed
- Stopped blocking users from overriding their layout.html. Using another approach to inserting the banner.
- Fixed
- Cloning from push remote instead of origin. If HTML files are pushed to another repo other than origin it doesn't make sense to clone from origin (previous files won't be available).
- Added
- Command line option:
--push-remote
- Command line option:
- Fixed
- Copy all remotes from the original repo to the temporarily cloned repo when pushing built docs to a remote. Carries over all remote URLs in case user defines a different URL for push vs fetch.
- Added
- Option to enable warning banner in old/development versions. Similar to Jinja2's documentation.
- Command line options:
--banner-greatest-tag--banner-recent-tag--show-banner--banner-main-ref - Jinja2 context functions:
vhasdoc()vpathto() - Jinja2 context variables:
scv_show_bannerscv_banner_greatest_tagscv_banner_main_ref_is_branchscv_banner_main_ref_is_tagscv_banner_main_versionscv_banner_recent_tag
- Changed
- Root ref will also be built in its own directory like other versions. All URLs to root ref will point to the one in that directory instead of the root. More info: sphinx-contrib#15
- Renamed Jinja2 context variable
scv_is_root_reftoscv_is_root.
- Fixed
- Removed
- Jinja2 context variables:
scv_root_ref_is_branchscv_root_ref_is_tag
- Jinja2 context variables:
- Added
--git-rootcommand line option.--whitelist-branchesand--whitelist-tagscommand line options.--local-confand--no-local-confcommand line options.- Load settings from conf.py file and command line arguments instead of just the latter.
- Changed
- Renamed command line option
--prioritizeto--priority. - Renamed command line option
-Sto-s. --chdir,--no-colors, and--verbosemust be specified before build/push and the other after.--sortno longer takes a comma separated string. Now specify multiple times (like--grm-exclude).- Renamed
--sortvalue "chrono" to "time". - Reordered positional command line arguments. Moved
REL_SOURCEbefore the destination arguments. - Renamed command line option
-Cto-Nfor consistency with sphinx-build.
- Renamed command line option
- Fixed
- Exposing sphinx-build verbosity to SCVersioning. Specify one
-vto make SCVersioning verbose and two or more to make sphinx-build verbose. - Using
--no-colorsalso turns off colors from sphinx-build. - sphinx-contrib#16
- Exposing sphinx-build verbosity to SCVersioning. Specify one
- Added
- Exposing Jinja2 context variables:
scv_is_branchscv_is_root_refscv_is_tagscv_root_ref_is_branchscv_root_ref_is_tagscv_is_greatest_tagscv_is_recent_branchscv_is_recent_refscv_is_recent_tag
- Exposing Jinja2 context variables:
- Changed
- Version links point to that version of the current page if it exists there.
- Fixed
- Fixed
- easy_install: sphinx-contrib#4
- Initial release.