diff --git a/docs/source/api_reference.rst b/docs/source/api_reference.rst index 51777d2c..6623423f 100644 --- a/docs/source/api_reference.rst +++ b/docs/source/api_reference.rst @@ -20,8 +20,14 @@ XGI is organized into the following subpackages: .. note:: - This page describes release |version| of XGI. Find out more about this release and previous releases in the `release notes `_. - + .. only:: stable_version + + This page describes release |version| of XGI. Find out more about this release and previous releases in the `release notes `_. + + .. only:: dev_version + + This page describes the latest XGI development with features that may not have been released yet. To see officially released features, visit the `API reference `_ for the most recent stable version. + .. toctree:: :maxdepth: 2 diff --git a/docs/source/conf.py b/docs/source/conf.py index 3056bbc4..180ae849 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -130,11 +130,12 @@ else: raise Exception(f"Error: HTTP response {r.status_code}") - rst_epilog = f""" .. role:: raw-html(raw) :format: html .. |release_announcement| replace:: :raw-html:`` +.. |release_date| replace:: {release_date} +.. |release_version| replace:: {release_version} """ today = release_date @@ -200,6 +201,12 @@ else: version_match = "stable" + +if version_match == "stable": + tags.add("stable_version") +elif version_match == "dev": + tags.add("dev_version") + # documentation. html_theme_options = { "logo": {