Settings
$ sphinx-versioned [OPTIONS]
The sphinx-versioned-docs reads options from two sources:
From the sphinx
conf.pyfile.From the provided command-line-arguments.
Configuration File Arguments
Currently, only the sv_project_url can be set via the conf.py. More options coming in future releases.
- sv_project_url: <url>
Setting this variable will make sure that the
Project homeis listed on the versions selector badge/menu.
Command Line Arguments
These command line options must be specified when executing the sphinx-versioned command.
- -c <directory>, --chdir <directory>
Change the current working directory.
- --git-root <directory>
Path to the git-root of the current repo. Default is the current working directory.
- -o <directory>, --output <directory>
Set the output directory.
- --local-conf <directory>
Path to the
conf.pyforsphinx-versioned. Default isconf.pyat the current working directory.
- --sphinx-compability
Adds compatibility for older sphinx versions by monkey patching certain functions. Default is False.
- --prebuild, --no-prebuild
Pre-build all versions to make sure
sphinx-buildhas no issues and pass-on the successful builds tosphinx-versioned-docs. Default is True.
- -b <branch names>, --branch <branch names>
Build documentation for selected branches and tags. The branch/tag names can be separated by
,or|and supports regex.Example:
sphinx-versioned --branch="main, v1.0, v2.0"sphinx-versioned --branch="main, -v*"
- -m <branch name>, --main-branch <branch name>
Specify the main-branch to which the top-level
index.htmlredirects to. Default ismain.
- --floating-badge, --badge
Turns the version selector menu into a floating badge. Default is False.
- --quite, --no-quite
Silents the output from sphinx. Use –no-quite to get complete-output from sphinx. Default is True.
- -v, --verbose
Passed directly to sphinx. Specify more than once for more logging in sphinx. Default is False.
- -log <level>, --log <level>
Provide logging level. Example –log debug, Default is
info. Logging levels can betrace,debug,warn,info, etc.
- --force
Force branch selection. Use this option to build detached head/commits. Default is False.
- --help
Show the help message in command-line.