Skip to index filter Skip to main content
Nefertiti-for-Sphinx Nefertiti for Sphinxsphinx-nefertiti
  • Quick Start
  • Customize
    • Fonts
    • Colorsets
    • Header Links
    • Footer Links
    • Version Dropdown
    • Git Repository
    • Document source links
    • Last updated timestamp
    • Modal window
    • Pygments
    • CSS variables

    • Color-schemed Images
  • Release Notes
Search the documentation

sphinx-nefertiti

  • Quick Start
  • Customize
    • Fonts
    • Colorsets
    • Header Links
    • Footer Links
    • Version Dropdown
    • Git Repository
    • Document source links
    • Last updated timestamp
    • Modal window
    • Pygments
    • CSS variables

    • Color-schemed Images
  • Release Notes

  • sphinx-nefertiti

  • Nefertiti for Sphinx latest
    • Versions

  • Change base color
    • Change base color
    • Blue
    • Indigo
    • Purple
    • Pink
    • Red
    • Orange
    • Yellow
    • Green
    • Teal
    • Cyan

    • Header style
    • Neutral

  • Change appearance
    • Change appearance
    • Light
    • Dark
    • Automatic
  Index
Index
  • Quick start
  • User’s guide
    • Installation
    • Customization
      • Fonts
      • Colorsets
      • Header links
      • Footer links
      • Version dropdown
      • Git repository
      • Document source links
      • Last updated timestamp
      • Modal window
      • Pygments
      • CSS variables
    • Localization
    • Theme Options
    • Components
      • Admonitions
      • Version changes
      • Code blocks
      • Headings
      • Images
      • Figures
      • Lists
      • Tables
        • Tables in Markdown
        • Tables in reStructuredText
      • Math and equations
        • Math in Markdown
        • Math in reStructuredText
      • Footnotes
  • Accessibility
  • Development
  • Contributing
  1. Start
  2. User’s guide
  3. Customization
  4. Footer links

Footer links¶

The footer of HTML pages built with Nefertiti for Sphinx is divided in 4 areas or strings, from top to bottom:

  • The area for the Nefertiti footer links, customizable with the html_theme_options.

  • The name of the project, provided by Sphinx project setting.

  • The copyright notice, provided by Sphinx copyright setting.

  • The powered-by notice.

Theme options¶

The following two options related with the footer can be customized in the html_theme_options:

  1. footer_links: Represents a list of dictionaries with text and links.

  2. html_show_sphinx: A boolean value.

1. footer_links¶

The footer links can be used to lead the user to other relevant pages related with your project, like a project’s homepage, a code repository, a forum or similar.

Changed in version 0.5: Previous to v0.5 footer_links were a comma separated list of links with the format <label>|<url>. From version 0.5 on footer_links has to be a list of dictionaries with keys text and link.

The content for the footer_links is a list of dictionaries with the format:

[
    {
        'text': '<the label to display>',
        'link': '<toctree-doc-path | URL>',
        'target': '<values for HTML anchor's attribute>',
    },
]

Each dictionary has two keys:

  1. text: represents the label for the link, and

  2. link: represents the target URL the user will visit when clicking on the link.

  3. (optional) target: may be any of the values given to the HTML anchor’s attribute. If left blank it takes the value _self.

A valid footer links could be:

html_theme_options = {
    # ... other options ...
    "footer_links": [
        {
            'text': 'Home',
            'link': 'index',
        }, {
            'text': 'Documentation',
            'link': 'https://myproject.org/docs',
            'target': '_blank',
        }, {
            'text': 'Code',
            'link': 'https://your.git.host/code',
            'target': '_blank',
        },
    ],

}

Here is the link to the source code for the footer_links displayed at the bottom of this documentation.

2. html_show_sphinx¶

The small notice Built with Sphinx and Nefertiti is displayed by default, and can be omitted by setting the html_show_sphinx to False:

html_show_sphinx = False

Rebuild the theme¶

With the previous changes in place, save the content, clean, build and serve your project again:

$ make clean
$ make html
$ python -m http.server -d build/html

Visit http://localhost:8000 to take a look at the changes.

  On this page
  • Footer links
    • Theme options
      • 1. footer_links
      • 2. html_show_sphinx
    • Rebuild the theme
  • Previous Header links
  • Next Version dropdown
  • Documentation
  • Package
  • Repository
  • Issues
Nefertiti for Sphinx
  • Code licensed MIT, docs CC BY 3.0.
Built with Sphinx 8.2.3 and Nefertiti 0.9.8