mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 06:52:59 +00:00
docs: use MyST fieldlist and substitution
This commit is contained in:
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
# JupyterHub API
|
# JupyterHub API
|
||||||
|
|
||||||
```{eval-rst}
|
<!--
|
||||||
:Date: |today|
|
Below is a MyST field list, using MyST substitution, as supported
|
||||||
:Release: |release|
|
by enabling the respective MyST extensions in docs/source/conf.py.
|
||||||
```
|
-->
|
||||||
|
:Date: {{ date }}
|
||||||
|
:Release: {{ version }}
|
||||||
|
|
||||||
JupyterHub also provides a REST API for administration of the Hub and users.
|
JupyterHub also provides a REST API for administration of the Hub and users.
|
||||||
The documentation on [Using JupyterHub's REST API](../reference/rest.md) provides
|
The documentation on [Using JupyterHub's REST API](../reference/rest.md) provides
|
||||||
|
@@ -20,8 +20,6 @@ from jupyterhub.app import JupyterHub
|
|||||||
project = "JupyterHub"
|
project = "JupyterHub"
|
||||||
author = "Project Jupyter Contributors"
|
author = "Project Jupyter Contributors"
|
||||||
copyright = f"{datetime.date.today().year}, {author}"
|
copyright = f"{datetime.date.today().year}, {author}"
|
||||||
version = "%i.%i" % jupyterhub.version_info[:2]
|
|
||||||
release = jupyterhub.__version__
|
|
||||||
|
|
||||||
|
|
||||||
# -- General Sphinx configuration --------------------------------------------
|
# -- General Sphinx configuration --------------------------------------------
|
||||||
@@ -48,11 +46,21 @@ default_role = "literal"
|
|||||||
# ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
|
# ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
|
||||||
#
|
#
|
||||||
myst_heading_anchors = 2
|
myst_heading_anchors = 2
|
||||||
|
|
||||||
myst_enable_extensions = [
|
myst_enable_extensions = [
|
||||||
|
# available extensions: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
|
||||||
"colon_fence",
|
"colon_fence",
|
||||||
"deflist",
|
"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 -----------------------------
|
# -- Custom directives to generate documentation -----------------------------
|
||||||
# ref: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html
|
# ref: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html
|
||||||
|
Reference in New Issue
Block a user