Debian Codegraph @

docs/source/conf.py

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 # Configuration file for the Sphinx documentation builder.
2 #
3 # This file only contains a selection of the most common options. For a full
4 # list see the documentation:
5 # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
7 # -- Path setup --------------------------------------------------------------
8
9 # If extensions (or modules to document with autodoc) are in another directory,
10 # add these directories to sys.path here. If the directory is relative to the
11 # documentation root, use os.path.abspath to make it absolute, like shown here.
12 #
13 # import os
14 # import sys
15 # sys.path.insert(0, os.path.abspath('.'))
16
17 import re
18
19 # -- Project information -----------------------------------------------------
20
21 project = 'rich-rst'
22 copyright = '2022, Wasi Master aka. Arian Mollik Wasi'
23 author = 'Wasi Master aka. Arian Mollik Wasi'
24
25 # The full version, including alpha/beta/rc tags
26 version = ''
27 with open('../../rich_rst/__init__.py', encoding="utf-8") as f:
28 version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
29
30 # -- General configuration ---------------------------------------------------
31
32 # Add any Sphinx extension module names here, as strings. They can be
33 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34 # ones.
35 extensions = [
36 'sphinx.ext.autodoc',
37 'sphinx.ext.viewcode',
38 'sphinx.ext.napoleon',
39 'sphinx.ext.intersphinx',
40 'sphinx_copybutton',
41 ]
42
43 # Add the locations and names of other projects that should be linked to in this documentation.
44 intersphinx_mapping = {'python': ('https://docs.python.org/3', None), 'rich': ('https://rich.readthedocs.io/en/stable/', None)}
45
46 # Add any paths that contain templates here, relative to this directory.
47 templates_path = ['_templates']
48
49 # List of patterns, relative to source directory, that match files and
50 # directories to ignore when looking for source files.
51 # This pattern also affects html_static_path and html_extra_path.
52 exclude_patterns = []
53
54 # For readthedocs
55 master_doc = 'index'
56
57 # -- Options for HTML output -------------------------------------------------
58
59 # The theme to use for HTML and HTML Help pages. See the documentation for
60 # a list of builtin themes.
61 #
62 # html_theme = 'sphinxawesome_theme'
63 html_theme = 'sphinx_rtd_theme'
64
65 # Add any paths that contain custom static files (such as style sheets) here,
66 # relative to this directory. They are copied after the builtin static files,
67 # so a file named "default.css" will overwrite the builtin "default.css".
68 html_static_path = ['_static']
69 # Add any files that contain extra static files that will be placed in the
70 # document root. They are copied after the builtin static files and will
71 # overwrite the builtin files
72 html_extra_path = ['_extra']
73 # Add any files that contain extra custom css
74 html_css_files = ["custom.css"]
75
76 # Config for sphinxawesome_theme
77 # html_permalinks_icon = '<span>#</span>'
78 # html_collapsible_definitions = True
79 # html_theme_options = {
80 # "show_prev_next": True,
81 # "show_scrolltop": True,
82 # "extra_header_links": {
83 # "Docs": "./docs",
84 # "Demo": "./demo",
85 # }
86 # }
87
88 html_theme_options = {
89 'display_version': True,
90 }
91 html_context = {
92 "display_github": True, # Add 'Edit on Github' link instead of 'View page source'
93 "github_user": "wasi-master",
94 "github_repo": project,
95 "github_version": "main",
96 "conf_py_path": "/docs/source/",
97 }