multi-user/docs/conf.py

131 lines
4.0 KiB
Python
Raw Permalink Normal View History

2020-01-16 01:47:20 +08:00
# 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 -----------------------------------------------------
2022-06-13 03:16:11 +08:00
project = 'Multi-User 0.5.x Documentation'
2020-01-16 01:47:20 +08:00
copyright = '2020, Swann Martinez'
2021-06-24 20:51:00 +08:00
author = 'Swann Martinez, Poochy, Fabian'
2020-01-16 01:47:20 +08:00
# The full version, including alpha/beta/rc tags
2022-06-13 03:16:11 +08:00
version_release = '0.5.5'
2020-01-16 01:47:20 +08:00
# -- 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']
2020-01-16 05:05:59 +08:00
# 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
2020-01-16 01:47:20 +08:00
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
2020-01-16 01:47:20 +08:00
# 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'
2020-01-16 01:47:20 +08:00
# 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
2020-01-16 01:47:20 +08:00
if on_rtd:
2020-01-16 02:05:46 +08:00
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 = {
2020-02-20 21:38:15 +08:00
'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".
2021-08-31 16:53:04 +08:00
html_logo = "resources/logo.png"
html_favicon = "ressources/favicon.ico"
html_static_path = ["resources"]
2021-08-31 16:53:04 +08:00
if html_theme == "sphinx_rtd_theme":
html_css_files = ["css/theme_overrides.css"]
2020-01-16 02:05:46 +08:00
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'Multi-User Manual'
2020-01-16 05:05:59 +08:00
# 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