forked from jazzband/pip-tools
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.py
60 lines (39 loc) · 1.68 KB
/
conf.py
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
# https://www.sphinx-doc.org/en/master/usage/configuration.html
"""Configuration file for the Sphinx documentation builder."""
from __future__ import annotations
from importlib.metadata import version as get_version
from pathlib import Path
from sphinx.util import logging
from sphinx.util.console import bold
logger = logging.getLogger(__name__)
# -- Path setup --------------------------------------------------------------
PROJECT_ROOT_DIR = Path(__file__).parents[1].resolve()
# -- Project information -----------------------------------------------------
project = "pip-tools"
author = f"{project} Contributors"
copyright = f"The {author}"
# The full version, including alpha/beta/rc tags
release = get_version(project)
# The short X.Y version
version = ".".join(release.split(".")[:3])
logger.info(bold("%s version: %s"), project, version)
logger.info(bold("%s release: %s"), project, release)
# -- 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 = ["myst_parser", "sphinxcontrib.programoutput"]
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"
html_title = f"<nobr>{project}</nobr> documentation v{release}"
# -------------------------------------------------------------------------
default_role = "any"
nitpicky = True
linkcheck_ignore = [
r"^https://matrix\.to/#",
r"^https://img.shields.io/matrix",
]
suppress_warnings = ["myst.xref_missing"]