-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconf.py
More file actions
86 lines (71 loc) · 2.71 KB
/
conf.py
File metadata and controls
86 lines (71 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Configuration file for the Sphinx documentation builder.
#
# 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
from datetime import datetime
from pathlib import Path
import tomllib
_project_data = tomllib.loads(
(Path(__file__).parent.parent / "pyproject.toml").read_text("utf8")
)["project"]
project = _project_data["name"]
author = _project_data["authors"][0]["name"]
copyright = f"{datetime.now().year}, {author}"
version = release = _project_data["version"]
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx_design",
"sphinx_needs",
"sphinx_codelinks",
"sphinx.ext.intersphinx",
"sphinx_code_tabs",
"sphinxcontrib.typer",
"sphinxcontrib.video",
]
# exclude_patterns = []
templates_path = ["_templates"]
show_warning_types = True
todo_include_todos = True
# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
"needs": ("https://sphinx-needs.readthedocs.io/en/latest/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
}
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_title = "CodeLinks"
html_theme = "furo"
# original source is in ubdocs repo at docs/developer_handbook/design/files/ubcode_favicon/favicon.ico
html_favicon = "source/_static/favicon.ico"
html_static_path = ["source/_static"]
html_theme_options = {
"sidebar_hide_name": True,
"top_of_page_buttons": ["view", "edit"],
"source_repository": "https://github.com/useblocks/sphinx-codelinks",
"source_branch": "main",
"source_directory": "docs/source/",
"light_logo": "sphinx-codelinks-logo_light.svg",
"dark_logo": "sphinx-codelinks-logo_dark.svg",
}
templates_path = ["source/_static/_templates/furo"]
html_sidebars = {
"**": [
"sidebar/brand.html",
"sidebar/search.html",
"sidebar/scroll-start.html",
"sidebar/navigation.html",
"sidebar/ethical-ads.html",
"sidebar/scroll-end.html",
"side-github.html",
"sidebar/variant-selector.html",
]
}
html_context = {"repository": "useblocks/sphinx-codelinks"}
html_css_files = ["furo.css"]
# Sphinx-Needs configuration
needs_from_toml = "ubproject.toml"
# Src-trace configuration
src_trace_config_from_toml = "./src_trace.toml"