-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathconf.py
74 lines (60 loc) · 1.89 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
"""Documentation configuration for `pyscript-cli`."""
from __future__ import annotations
import sys
from datetime import datetime
from pathlib import Path
import toml
# Ensure the package is in the path
project_root = Path(__file__).parents[2]
sys.path.insert(0, (project_root / "src").as_posix())
# General information about the project.
project = "pyscript-cli"
author = "Anaconda"
copyright = f"2022 - {datetime.now().year}, {author}"
# Load the package version from pyproject.toml
with (project_root / "pyproject.toml").open("r") as fp:
version = toml.load(fp)["project"]["version"]
release = version
# 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",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
exclude_patterns: list[str] = []
# The suffix(es) of source filenames.
source_suffix = [".rst", ".md"]
# The master toctree document.
master_doc = "index"
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
autodoc_default_options = {
"members": None,
"undoc-members": None,
"show-inheritance": None,
}
# The theme to use for HTML and HTML Help pages.
html_theme = "pydata_sphinx_theme"
# html_logo = "_static/avatar.jpeg"
html_favicon = "_static/avatar.jpeg"
html_theme_options = {
"github_url": "https://github.com/pyscript/pyscript-cli",
"icon_links": [
{
"name": "PyPI",
"url": "https://pypi.org/project/pyscript-cli",
"icon": "fas fa-box",
},
],
}
html_static_path = ["_static"]