basgi/docs/conf.py

71 lines
2.1 KiB
Python

# 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
import sys
from pathlib import Path
## Make sure izzylib is in sys.path
docpath = Path(__file__).resolve().parent
sys.path.insert(0, str(docpath.parent))
## Get the major and minor Python version numbers to link to the proper documentation for Python classes
pyversion = '.'.join(str(v) for v in sys.version_info[:2])
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "Barkshark ASGI"
import basgi
copyright = "2024 Zoey Mae"
author = "Zoey Mae"
release = basgi.__version__
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx_external_toc"
]
autodoc_typehints = "description"
autodoc_class_signature = "separated"
autodoc_member_order = "bysource"
external_toc_path = str(docpath.joinpath("toc.yml"))
external_toc_exclude_missing = True
templates_path = ["templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
intersphinx_mapping = {
"python": (f"https://docs.python.org/{pyversion}", None),
"aputils": ("https://docs.barkshark.xyz/aputils", None),
"bsql": ("https://docs.barkshark.xyz/barkshark-sql", None),
"gemi": ("https://docs.barkshark.xyz/gemi", None),
"hamlish-jinja": ("https://docs.barkshark.xyz/hamlish-jinja", None),
"jinja2": ("https://jinja.palletsprojects.com/en/3.1.x/", None)
}
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "furo"
html_static_path = ["_static"]
html_css_files = [
"override.css"
]
html_theme_options = {
"dark_css_variables": {
"color-api-background": "#1e2126"
}
}