multi-user/docs/conf.py
2022-06-12 21:16:11 +02:00

131 lines
4.0 KiB
Python

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
# -- Project information -----------------------------------------------------
project = 'Multi-User 0.5.x Documentation'
copyright = '2020, Swann Martinez'
author = 'Swann Martinez, Poochy, Fabian'
# The full version, including alpha/beta/rc tags
version_release = '0.5.5'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = ".rst"
# The master toctree document.
master_doc = "index"
# General information about the projet
projet = 'Multi-User %s Doc' % version_release
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# -- Options for HTML output -------------------------------------------------
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
html_theme = "default"
try:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
del sphinx_rtd_theme
except ModuleNotFoundError:
pass
if on_rtd:
using_rtd_theme = True
# 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
# documentation.
html_theme_options = {
'collapse_navigation': False, # Collapse navigation (False makes it tree-like)
}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = []
if html_theme == "sphinx_rtd_theme":
html_theme_options = {
"analytics_id": "UA-1418081-1",
# included in the title
"display_version": False,
"collapse_navigation": True,
"navigation_depth": -1,
}
extensions.append('sphinx_rtd_theme')
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
html_title = "Multi-User Doc"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_logo = "resources/logo.png"
html_favicon = "ressources/favicon.ico"
html_static_path = ["resources"]
if html_theme == "sphinx_rtd_theme":
html_css_files = ["css/theme_overrides.css"]
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'Multi-User Manual'
# sphinx-notfound-page
# https://github.com/readthedocs/sphinx-notfound-page
notfound_context = {
'title': 'Page Not Found',
'body': '''
<h1>Page Not Found</h1>
<p>Sorry, we couldn't find that page.</p>
<p>Try using the search box or go to the homepage.</p>
''',
}
# Enable directives that insert the contents of external files
file_insertion_enabled = False