forked from xenserver/python-libs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconf.py
More file actions
76 lines (62 loc) · 3.02 KB
/
conf.py
File metadata and controls
76 lines (62 loc) · 3.02 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
# Configuration file for the Sphinx documentation builder.
# -- Path setup -------------------------------------------------------------
import logging
import os
import sys
from datetime import datetime
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# Add project root to sys.path for autodoc to find xcp modules and it allows
# to {include} the toplevel README.md files from their wrapper files here.
sys.path.insert(0, os.path.abspath("../.."))
# Add stubs directory to sys.path for stubs (xcp/bootloader.py needs a branding.py)
sys.path.insert(0, os.path.abspath("../../stubs"))
#
# To support Markdown-based documentation, Sphinx can use MyST-Parser.
# MyST-Parser is a Docutils bridge to markdown-it-py, a Python package
# for parsing the CommonMark Markdown flavor.
# See https://myst-parser.readthedocs.io/en/latest/ for details.
# Set the log level of markdown-it log categories to INFO to disable DEBUG
# logging and prevent flooding the logs with many 1000s of DEBUG messages:
#
logging.getLogger("markdown_it.rules_block").setLevel(logging.INFO)
logging.getLogger("markdown_it.rules_inline").setLevel(logging.INFO)
logging.getLogger("markdown_it").setLevel(logging.INFO)
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "python-libs"
copyright = "2025, Citrix Inc." # pylint: disable=redefined-builtin
author = "Citrix Inc."
release = datetime.now().strftime("%Y.%m.%d-%H%M")
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html
# Set the favicon and logo to XenServer branding.
html_favicon = "https://xenserver.com/content/dam/xenserver/images/favicon-32x32.png"
html_logo = "https://www.xenserver.com/content/dam/xenserver/images/xenserver-full-color-rgb.svg"
# -- MyST-Parser configuration -----------------------------------------------
# https://github.com/mgaitan/sphinxcontrib-mermaid:
# Enables GitHub-style mermaid code blocks in markdown files.
# See https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
# This allows to use mermaid code blocks in markdown files like this:
# ```mermaid
# graph TD;
# A-->B;
# ```
myst_fence_as_directive = ["mermaid"]
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinxcontrib.mermaid",
"myst_parser",
]
myst_heading_anchors = 2
templates_path = ["_templates"]
exclude_patterns: list[str] = []
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "furo"
# No static html source files for now.
# html_static_path = ["_static"]