docs: use MyST fieldlist and substitution

This commit is contained in:
Erik Sundell
2022-12-07 14:16:22 +01:00
parent f3bb3651b3
commit 71d5e604cb
2 changed files with 16 additions and 6 deletions

View File

@@ -20,8 +20,6 @@ from jupyterhub.app import JupyterHub
project = "JupyterHub"
author = "Project Jupyter Contributors"
copyright = f"{datetime.date.today().year}, {author}"
version = "%i.%i" % jupyterhub.version_info[:2]
release = jupyterhub.__version__
# -- General Sphinx configuration --------------------------------------------
@@ -48,11 +46,21 @@ default_role = "literal"
# ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
#
myst_heading_anchors = 2
myst_enable_extensions = [
# available extensions: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
"colon_fence",
"deflist",
"fieldlist",
"substitution",
]
myst_substitutions = {
# date example: Dev 07, 2022
"date": datetime.date.today().strftime("%b %d, %Y").title(),
"version": jupyterhub.__version__,
}
# -- Custom directives to generate documentation -----------------------------
# ref: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html