diff --git a/_includes/overrides/banner.html b/_includes/overrides/banner.html index 5040ffa..a475b24 100644 --- a/_includes/overrides/banner.html +++ b/_includes/overrides/banner.html @@ -1,13 +1,14 @@ -{% if config.extra.version %} +{% if config.version_banner %}
- {% if config.extra.version == "latest" %} - This documentation is for the development version of InvenTree, which may be significantly different from previous stable releases. - For stable release documentation, use the version selector located in the bottom right corner of this page. - {% elif self.outdated() %} - This documentation is for an outdated version of InvenTree. - For updated release documentation, use the version selector located in the bottom right corner of this page. + + {% if config.readthedocs.version == 'latest' %} + This documentation is for the development version of InvenTree, which may be significantly different from the stable releases. + {% else %} + This documentation is for an outdated version of InvenTree. {% endif %} + For stable release documentation, use the version selector located in the bottom right corner of this page. +
{% endif %} diff --git a/docs/hooks.py b/docs/hooks.py index a7d38a2..1bd9fff 100644 --- a/docs/hooks.py +++ b/docs/hooks.py @@ -49,6 +49,10 @@ def on_config(config, *args, **kwargs): # Supply this to the context config['readthedocs'] = readthedocs + # Determine if we want to display a 'version' banner + # Basically we do, *unless* we are displaying the "stable" version + config['version_banner'] = rtd_version != 'stable' + else: print("'READTHEDOCS' environment variable not found") print("Building for localhost configuration!")