Sphinx Themes: Permalinks to heading#
Permalinks are small anchors next to the heading which allows to copy and share URL directly to that heading within the page. By default, Sphinx generates those permalinks with ¶
character (the paragraph sign), but the most themes hides it until heading mouse hover.
Markup#
By default, each heading contains a <a>
link to the heading, as the following HTML markup:
<h1>Architecture<a class="headerlink" href="#architecture" title="Link to this heading">¶</a></h1>
The complete URL will be e.g., https://on.documatt.com/example/installation.html#architecture
.
conf.py#
html_permalinks
#
(default True
)
Whether to generate permalinks to the heading in the HTML output.
html_permalinks_icon
#
(default ¶
)
Text which will be used as permalink anchor. It could be single Unicode character or arbitrary HTML string like icon font.
html_permalinks_icon = "<i class='fas fa-link'></i>"
Comments
comments powered by Disqus