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. Document source links

Document source links¶

Sphinx offers two settings that help to visualize document source files:

  • html_copy_source [1]

  • html_show_sourcelink [2]

Show source¶

When html_copy_source is True Sphinx copies the input files to the output directory and adds their paths to the HTML context. Nefertiti displays the link to each source input file using the following icon:

../../_images/file-earmark-code.svg

It is displayed at the top of the document, in the same line as the breadcrumbs, aligned to the right.

Show source in repository¶

The html_show_sourcelink setting is used in combination with the configuration option docs_repository_url that goes in the html_theme_options:

html_show_sourcelink = True
html_theme_options = {
    # ...other options...
    "docs_repository_url": "https://code.net/repo/tree/main/docs/source/",
}

When html_show_sourcelink is True and docs_repository_url contains the URL to your documentation repository, Nefertiti displays a link to the input file in the repository, represented with the following icon:

../../_images/pencil.svg

It is displayed at the top of the document, in the same line as the breadcrumbs, aligned to the right.

  On this page
  • Document source links
    • Show source
    • Show source in repository
  • Previous Git repository
  • Next Last updated timestamp
  • 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