boostorg / boostorg/gil

permalinks in docs

Open
#790 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
199
Forks
171
Avg merge
1d 14h
Merged PRs (30d)
10

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.