conf.py
347 lines
| 10.8 KiB
| text/x-python
|
PythonLexer
/ docs / conf.py
r5193 | # Configuration file for the Sphinx documentation builder. | |||
r1 | # | |||
r5193 | # For the full list of built-in configuration values, see the documentation: | |||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||||
# -- Project information ----------------------------------------------------- | ||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||||
r1 | ||||
r5193 | import os | |||
r1 | import sys | |||
import datetime | ||||
r5193 | ||||
# sphinx injects tags magically during build, we re-define it here to make linters happy | ||||
tags = tags # noqa | ||||
r1 | ||||
# 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. | ||||
r5193 | sys.path.insert(0, os.path.abspath(".")) | |||
def _get_version(): | ||||
with open("../rhodecode/VERSION") as f: | ||||
return f.read().strip() | ||||
now = datetime.datetime.today() | ||||
# The full project version, used as the replacement for |release| and e.g. in the HTML templates. | ||||
# For example, for the Python documentation, this may be something like 2.6.0rc1. | ||||
# If you don’t need the separation provided between version and release, just set them both to the same value. | ||||
release = _get_version() | ||||
# The major project version, used as the replacement for |version|. | ||||
# For example, for the Python documentation, this may be something like 2.6. | ||||
version = ".".join(release.split(".", 2)[:2]) # First two parts of release | ||||
# General information about the project. | ||||
project = "RhodeCode Enterprise" | ||||
copyright = f"2010-{now.year}, RhodeCode GmbH" | ||||
author = "RhodeCode GmbH" | ||||
r1 | ||||
# -- General configuration ------------------------------------------------ | ||||
# If your documentation needs a minimal Sphinx version, state it here. | ||||
r5193 | # needs_sphinx = '1.0' | |||
r1 | ||||
# Add any Sphinx extension module names here, as strings. They can be | ||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||||
# ones. | ||||
extensions = [ | ||||
r5193 | "sphinx.ext.autodoc", | |||
"sphinx.ext.intersphinx", | ||||
"sphinx.ext.todo", | ||||
"sphinx.ext.imgmath", | ||||
r1 | ] | |||
intersphinx_mapping = { | ||||
r5193 | "enterprise": ("https://docs.rhodecode.com/RhodeCode-Enterprise/", None), | |||
"rcstack": ("https://docs.rhodecode.com/rcstack/", None), | ||||
"control": ("https://docs.rhodecode.com/RhodeCode-Control/", None), | ||||
r1 | } | |||
# Add any paths that contain templates here, relative to this directory. | ||||
r5193 | templates_path = ["_templates"] | |||
r1 | ||||
# The suffix of source filenames. | ||||
r5193 | source_suffix = ".rst" | |||
r1 | ||||
# The encoding of source files. | ||||
r5193 | # source_encoding = 'utf-8-sig' | |||
r1 | ||||
# The master toctree document. | ||||
r5193 | master_doc = "index" | |||
r1 | ||||
# The version info for the project you're documenting, acts as replacement for | ||||
# |version| and |release|, also used in various other places throughout the | ||||
# built documents. | ||||
r2999 | ||||
r1 | # The language for content autogenerated by Sphinx. Refer to documentation | |||
# for a list of supported languages. | ||||
r5193 | # language = None | |||
r1 | ||||
r5193 | rst_epilog = """ | |||
r1 | .. |async| replace:: asynchronous | |||
r5193 | .. |AE| replace:: Appenlight | |||
.. |authtoken| replace:: Authentication Token | ||||
.. |authtokens| replace:: **Auth Tokens** | ||||
.. |RCCEshort| replace:: Community | ||||
.. |RCEEshort| replace:: Enterprise | ||||
.. |git| replace:: Git | ||||
.. |hg| replace:: Mercurial | ||||
.. |svn| replace:: Subversion | ||||
.. |LDAP| replace:: LDAP / Active Directory | ||||
.. |os| replace:: operating system | ||||
.. |OS| replace:: Operating System | ||||
.. |PY| replace:: Python | ||||
.. |pr| replace:: pull request | ||||
.. |prs| replace:: pull requests | ||||
.. |psf| replace:: Python Software Foundation | ||||
.. |repo| replace:: repository | ||||
.. |repos| replace:: repositories | ||||
.. |RCC| replace:: RhodeCode Control | ||||
.. |RCE| replace:: RhodeCode Enterprise | ||||
.. |RCCE| replace:: RhodeCode Community | ||||
.. |RCEE| replace:: RhodeCode Enterprise | ||||
.. |RCX| replace:: RhodeCode Extensions | ||||
.. |RCT| replace:: RhodeCode Tools | ||||
.. |RCEBOLD| replace:: **RhodeCode Enterprise** | ||||
.. |RCEITALICS| replace:: `RhodeCode Enterprise` | ||||
.. |RNS| replace:: Release Notes | ||||
r1 | """ | |||
# There are two options for replacing |today|: either, you set today to some | ||||
# non-false value, then it is used: | ||||
r5193 | # today = '' | |||
r1 | # Else, today_fmt is used as the format for a strftime call. | |||
r5193 | # today_fmt = '%B %d, %Y' | |||
r1 | ||||
# List of patterns, relative to source directory, that match files and | ||||
# directories to ignore when looking for source files. | ||||
exclude_patterns = [ | ||||
# Special directories | ||||
r5193 | "_build", | |||
"result", | ||||
r1 | # Other RST files | |||
r5193 | "admin/rhodecode-backup.rst", | |||
"issue-trackers/redmine.rst", | ||||
"known-issues/error-msg-guide.rst", | ||||
"tutorials/docs-build.rst", | ||||
"integrations/example-ext.py", | ||||
"collaboration/supported-workflows.rst", | ||||
r1 | ] | |||
# The reST default role (used for this markup: `text`) to use for all | ||||
# documents. | ||||
r5193 | # default_role = None | |||
r1 | ||||
# If true, '()' will be appended to :func: etc. cross-reference text. | ||||
r5193 | # add_function_parentheses = True | |||
r1 | ||||
# If true, the current module name will be prepended to all description | ||||
# unit titles (such as .. function::). | ||||
r5193 | # add_module_names = True | |||
r1 | ||||
# If true, sectionauthor and moduleauthor directives will be shown in the | ||||
# output. They are ignored by default. | ||||
r5193 | # show_authors = False | |||
r1 | ||||
# The name of the Pygments (syntax highlighting) style to use. | ||||
r5193 | pygments_style = "sphinx" | |||
r1 | ||||
# A list of ignored prefixes for module index sorting. | ||||
r5193 | # modindex_common_prefix = [] | |||
r1 | ||||
# If true, keep warnings as "system message" paragraphs in the built documents. | ||||
keep_warnings = tags.has("dev") | ||||
# -- Options for HTML output ---------------------------------------------- | ||||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||||
# a list of builtin themes. | ||||
r5193 | html_theme = "furo" | |||
r1 | ||||
# 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. | ||||
r5193 | # html_theme_options = {} | |||
r1 | ||||
# Add any paths that contain custom themes here, relative to this directory. | ||||
r5193 | # html_theme_path = [] | |||
r1 | ||||
# The name for this set of Sphinx documents. If None, it defaults to | ||||
# "<project> v<release> documentation". | ||||
r5193 | # html_title = None | |||
r1 | ||||
# A shorter title for the navigation bar. Default is the same as html_title. | ||||
r5193 | # html_short_title = None | |||
r1 | ||||
# The name of an image file (relative to this directory) to place at the top | ||||
# of the sidebar. | ||||
r5193 | # html_logo = None | |||
#html_sidebars = { | ||||
# "**": ["globaltoc.html"], | ||||
#} | ||||
r1 | ||||
# The name of an image file (within the static path) to use as favicon of the | ||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | ||||
# pixels large. | ||||
r5193 | html_favicon = "images/favicon.ico" | |||
r1 | ||||
# 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". | ||||
r5193 | html_static_path = ["static/css/add.css"] | |||
r1 | ||||
# Add any extra paths that contain custom files (such as robots.txt or | ||||
# .htaccess) here, relative to this directory. These files are copied | ||||
# directly to the root of the documentation. | ||||
r5193 | # html_extra_path = [] | |||
r1 | ||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | ||||
# using the given strftime format. | ||||
r5193 | html_last_updated_fmt = " %H:%m %b %d, %Y" | |||
r1 | ||||
# If true, SmartyPants will be used to convert quotes and dashes to | ||||
# typographically correct entities. | ||||
r5193 | # html_use_smartypants = True | |||
r1 | ||||
# Custom sidebar templates, maps document names to template names. | ||||
r5193 | # html_sidebars = {} | |||
r1 | ||||
# Additional templates that should be rendered to pages, maps page names to | ||||
# template names. | ||||
r5193 | # html_additional_pages = {} | |||
r1 | ||||
# If false, no module index is generated. | ||||
r5193 | # html_domain_indices = True | |||
r1 | ||||
# If false, no index is generated. | ||||
r5193 | # html_use_index = True | |||
r1 | ||||
# If true, the index is split into individual pages for each letter. | ||||
r5193 | # html_split_index = False | |||
r1 | ||||
# If true, links to the reST sources are added to the pages. | ||||
r5193 | # html_show_sourcelink = True | |||
r1 | ||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. | ||||
r5193 | html_show_sphinx = False | |||
r1 | ||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. | ||||
r5193 | # html_show_copyright = True | |||
r1 | ||||
# If true, an OpenSearch description file will be output, and all pages will | ||||
# contain a <link> tag referring to it. The value of this option must be the | ||||
# base URL from which the finished HTML is served. | ||||
r5193 | # html_use_opensearch = '' | |||
r1 | ||||
# This is the file name suffix for HTML files (e.g. ".xhtml"). | ||||
r5193 | # html_file_suffix = None | |||
r1 | ||||
# Output file base name for HTML help builder. | ||||
r5193 | htmlhelp_basename = "rhodecode-enterprise" | |||
r1 | ||||
# -- Options for LaTeX output --------------------------------------------- | ||||
latex_elements = { | ||||
r5193 | "classoptions": ",oneside", | |||
"babel": "\\usepackage[english]{babel}", | ||||
# The paper size ('letterpaper' or 'a4paper'). | ||||
#'papersize': 'letterpaper', | ||||
# The font size ('10pt', '11pt' or '12pt'). | ||||
#'pointsize': '10pt', | ||||
# Additional stuff for the LaTeX preamble. | ||||
#'preamble': '', | ||||
r1 | } | |||
# Grouping the document tree into LaTeX files. List of tuples | ||||
# (source start file, target name, title, | ||||
# author, documentclass [howto, manual, or own class]). | ||||
latex_documents = [ | ||||
r5193 | ( | |||
"index", | ||||
"RhodeCodeEnterprise.tex", | ||||
"RhodeCode Enterprise", | ||||
"RhodeCode GmbH", | ||||
"manual", | ||||
), | ||||
r1 | ] | |||
# The name of an image file (relative to this directory) to place at the top of | ||||
# the title page. | ||||
r5193 | # latex_logo = None | |||
r1 | ||||
# For "manual" documents, if this is true, then toplevel headings are parts, | ||||
# not chapters. | ||||
r5193 | # latex_use_parts = False | |||
r1 | ||||
# If true, show page references after internal links. | ||||
latex_show_pagerefs = True | ||||
# If true, show URL addresses after external links. | ||||
r5193 | latex_show_urls = "footnote" | |||
r1 | ||||
# Documents to append as an appendix to all manuals. | ||||
r5193 | # latex_appendices = [] | |||
r1 | ||||
# If false, no module index is generated. | ||||
r5193 | # latex_domain_indices = True | |||
r1 | ||||
# Mode for literal blocks wider than the frame. Can be | ||||
# overflow, shrink or truncate | ||||
pdf_fit_mode = "truncate" | ||||
# -- Options for manual page output --------------------------------------- | ||||
# One entry per manual page. List of tuples | ||||
# (source start file, name, description, authors, manual section). | ||||
man_pages = [ | ||||
r5193 | ("index", "rhodecodeenterprise", "RhodeCode Enterprise", ["RhodeCode GmbH"], 1) | |||
r1 | ] | |||
# If true, show URL addresses after external links. | ||||
r5193 | # man_show_urls = False | |||
r1 | ||||
# -- Options for Texinfo output ------------------------------------------- | ||||
# Grouping the document tree into Texinfo files. List of tuples | ||||
# (source start file, target name, title, author, | ||||
# dir menu entry, description, category) | ||||
texinfo_documents = [ | ||||
r5193 | ( | |||
"index", | ||||
"RhodeCodeEnterprise", | ||||
"RhodeCode Enterprise", | ||||
"RhodeCode Docs Team", | ||||
"RhodeCodeEnterprise", | ||||
"RhodeCode Docs Project", | ||||
"Miscellaneous", | ||||
), | ||||
r1 | ] | |||
# Documents to append as an appendix to all manuals. | ||||
r5193 | # texinfo_appendices = [] | |||
r1 | ||||
# If false, no module index is generated. | ||||
r5193 | # texinfo_domain_indices = True | |||
r1 | ||||
# How to display URL addresses: 'footnote', 'no', or 'inline'. | ||||
r5193 | # texinfo_show_urls = 'footnote' | |||
r1 | ||||
# If true, do not generate a @detailmenu in the "Top" node's menu. | ||||
r5193 | # texinfo_no_detailmenu = False | |||
r1 | ||||
# We want to see todo notes in case of a pre-release build of the documentation | ||||
todo_include_todos = tags.has("dev") | ||||