How do I get a clickable "permalink" to show on hover (for e.g. h2
headers) similar to this.
I'm using the pelican framework and am writing in restructuredText. I can't figure out where in the stack to tweak to enable this (pelican? rst? jinja2?)
It's called a label. Usage is documented under the ref
role.
To support cross-referencing to arbitrary locations in any document, the standard reST labels are used. For this to work label names must be unique throughout the entire documentation. There are two ways in which you can refer to labels:
If you place a label directly before a section title, you can reference to it with :ref:
label-name
. For example:.. _my-reference-label: Section to cross-reference -------------------------- This is the text of the section. It refers to the section itself, see :ref:`my-reference-label`.
Edit
For Pelican, there is a plugin called headerid
that will render permalinks.