diff --git a/docs/source/api/index.md b/docs/source/api/index.md index 4af749cf..357bf16c 100644 --- a/docs/source/api/index.md +++ b/docs/source/api/index.md @@ -2,10 +2,12 @@ # JupyterHub API -```{eval-rst} -:Date: |today| -:Release: |release| -``` + +:Date: {{ date }} +:Release: {{ version }} 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 diff --git a/docs/source/conf.py b/docs/source/conf.py index 362089b5..f8f92cc8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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