|
|
|
@ -13,9 +13,23 @@
|
|
|
|
|
# serve to show the default.
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import subprocess
|
|
|
|
|
import os
|
|
|
|
|
import sphinx_rtd_theme
|
|
|
|
|
|
|
|
|
|
# fetch git version/hash
|
|
|
|
|
subprocess_params = {'stderr': open(os.devnull, 'w')}
|
|
|
|
|
if sys.version_info[0] == 3:
|
|
|
|
|
subprocess_params['encoding'] = 'utf-8'
|
|
|
|
|
try:
|
|
|
|
|
__repo__version = subprocess.check_output(["git", "describe", "--tags"], **subprocess_params)
|
|
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
|
try:
|
|
|
|
|
__repo__version = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"], **subprocess_params)
|
|
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
|
__repo__version = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
|
|
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
|
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
|
|
@ -65,9 +79,9 @@ author = u'Deciso B.V.'
|
|
|
|
|
# built documents.
|
|
|
|
|
#
|
|
|
|
|
# The short X.Y version.
|
|
|
|
|
version = u'Wiki & Documentation'
|
|
|
|
|
version = u'Wiki & Documentation<br/><small>%s</small>' % __repo__version
|
|
|
|
|
# The full version, including alpha/beta/rc tags.
|
|
|
|
|
release = u'Wiki & Documentation'
|
|
|
|
|
release = u'Wiki & Documentation<br/><small>%s</small>' % __repo__version
|
|
|
|
|
|
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
|
|
# for a list of supported languages.
|
|
|
|
@ -120,7 +134,7 @@ todo_include_todos = True
|
|
|
|
|
# a list of builtin themes.
|
|
|
|
|
# html_theme = 'alabaster'
|
|
|
|
|
html_theme = "sphinx_rtd_theme"
|
|
|
|
|
html_style = 'css/opnsense.css'
|
|
|
|
|
html_style = 'css/opnsense.css'
|
|
|
|
|
|
|
|
|
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
|
|
|
# further. For a list of options available for each theme, see the
|
|
|
|
|