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
|
import importlib.metadata
import re
HOMEPAGE = "https://github.com/python-jsonschema/jsonschema-specifications"
project = "jsonschema-specifications"
author = "Julian Berman"
copyright = f"2022, {author}"
release = importlib.metadata.version("jsonschema-specifications")
version = release.partition("-")[0]
language = "en"
default_role = "any"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosectionlabel",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"sphinxcontrib.spelling",
"sphinxext.opengraph",
]
pygments_style = "lovelace"
pygments_dark_style = "one-dark"
html_theme = "furo"
# = Builders =
def entire_domain(host):
return r"http.?://" + re.escape(host) + r"($|/.*)"
linkcheck_ignore = [
entire_domain("img.shields.io"),
f"{HOMEPAGE}/actions",
f"{HOMEPAGE}/workflows/CI/badge.svg",
]
# = Extensions =
# -- autodoc --
autodoc_default_options = {
"members": True,
"member-order": "bysource",
}
# -- autosectionlabel --
autosectionlabel_prefix_document = True
# -- intersphinx --
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"referencing": ("https://referencing.readthedocs.io/en/latest/", None),
}
# -- sphinxcontrib-spelling --
spelling_word_list_filename = "spelling-wordlist.txt"
spelling_show_suggestions = True
|