sphinx-versions
stable

General

  • Installation
  • Tutorial
  • Banner Message
    • From branch to main-ref
    • From old tag to main-ref
    • From a page not existing in the main-ref
  • Settings
  • HTML Context API
  • Supported Themes

Appendix

  • How to contribute
  • Changelog
sphinx-versions
  • Docs »
  • Banner Message
  • Edit on GitHub

Banner Message¶

Banner messages can be displayed at the top of every document informing users that they are currently viewing either old or the development version of the project’s documentation, with the exception of the --banner-main-ref. This feature is inspired by banner on the Jinja2 documentation.

The banner feature is disabled by default. It can be enabled with the --show-banner setting (see the settings for more configuration options).

From branch to main-ref¶

The message displayed when users are viewing docs from a branch and the --banner-main-ref is a tag. The entire banner is a link that sends users to the latest version of the current page if it exists there.

_images/sphinx_rtd_theme_banner_dev.png

From old tag to main-ref¶

The message displayed when users are viewing docs from a tag and the --banner-main-ref is a tag. Like the message above this one links users to the latest version of the current page.

_images/sphinx_rtd_theme_banner_old.png

From a page not existing in the main-ref¶

An example of a banner message from a page that does not exist in the --banner-main-ref version. Since there is no page to link to this is just text informing the user that they’re viewing the development version of the docs.

_images/sphinx_rtd_theme_banner_nourl.png
Next Previous

© Copyright 2018, Smile Revision 82eb75c5.

Built with Sphinx using a theme provided by Read the Docs.