Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional version banner details. #1973

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/user_guide/announcements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ In addition to the general-purpose announcement banner, the theme includes a bui
"preferred": true
}

If the active version compares less than the preferred version, the announcement will inform the user that
they are viewing an older version of the documentation and provide a link to the preferred version. If the
version compares greater than the preferred version (or if the version match contains the strings `"dev"`,
`"rc"` or `"pre"`), the announcement will say they are viewing an unstable development version instead.

If you want similar functionality for *older* versions of your docs (i.e. those built before the ``show_version_warning_banner`` configuration option was available), you can manually add a banner by prepending the following HTML to all pages (be sure to replace ``URL_OF_STABLE_VERSION_OF_PROJECT`` with a valid URL, and adjust styling as desired):

.. code-block:: html
Expand Down
Loading