Skip to content

permalinks in docs #790

Description

@sdarwin

Sphinx 9.1.0 will add permalinks to all sections. See screenshot below. Any comments?

Option 1. Leave permalinks.

Option 2: Completely disable permalinks (quickest)

Add this to your conf.py:
html_permalinks = False

This completely removes the ¶ characters and the linking functionality. Simple and effective if you don't need section permalinks.

Option 3: Keep permalinks but only show them on hover (recommended)

Most people prefer this behavior — the ¶ only appears when you hover over a heading.

Create (or edit) a custom CSS file. Usually something like:textdoc/_static/custom.css
Add the following CSS:CSS/* Hide permalink by default */
a.headerlink {
visibility: hidden;
}

/* Show it only when hovering over the heading */
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink {
visibility: visible;
}
Tell Sphinx to use this CSS file by adding this to conf.py:Pythonhtml_css_files = ['custom.css'](Adjust the path if your static files are in a different location.)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions