2020-03-26 13:19:20 +03:00
|
|
|
---
|
|
|
|
template: overrides/main.html
|
|
|
|
---
|
|
|
|
|
2016-10-30 13:26:55 +03:00
|
|
|
# Permalinks
|
|
|
|
|
2016-12-18 15:29:03 +03:00
|
|
|
Permalinks are a feature of the [Table of Contents][1] extension, which is part
|
2016-11-02 21:21:14 +03:00
|
|
|
of the standard Markdown library. The extension inserts an anchor at the end of
|
2020-03-09 21:03:48 +03:00
|
|
|
each headline, which makes it possible to directly link to a specific section
|
|
|
|
of the document.
|
2016-10-30 13:26:55 +03:00
|
|
|
|
2018-02-22 21:26:35 +03:00
|
|
|
[1]: https://python-markdown.github.io/extensions/toc/
|
2016-12-18 15:29:03 +03:00
|
|
|
|
2020-03-09 21:03:48 +03:00
|
|
|
## Configuration
|
2016-10-30 13:26:55 +03:00
|
|
|
|
2020-03-09 21:03:48 +03:00
|
|
|
Add the following lines to `mkdocs.yml`:
|
2016-10-30 13:26:55 +03:00
|
|
|
|
2016-11-02 21:21:14 +03:00
|
|
|
``` yaml
|
|
|
|
markdown_extensions:
|
2017-10-16 20:13:05 +03:00
|
|
|
- toc:
|
|
|
|
permalink: true
|
2016-10-30 13:26:55 +03:00
|
|
|
```
|
|
|
|
|
2016-12-15 17:55:40 +03:00
|
|
|
This will add a link containing the paragraph symbol `¶` at the end of each
|
2020-03-09 21:03:48 +03:00
|
|
|
headline (exactly like on the page you're currently viewing), which Material
|
|
|
|
for MkDocs will make appear on hover. In order to change the text of the
|
2016-10-30 13:26:55 +03:00
|
|
|
permalink, a string can be passed, e.g.:
|
|
|
|
|
2020-03-10 00:29:01 +03:00
|
|
|
``` yaml
|
2016-11-02 21:21:14 +03:00
|
|
|
markdown_extensions:
|
2017-10-16 20:13:05 +03:00
|
|
|
- toc:
|
|
|
|
permalink: Link
|
2016-10-30 13:26:55 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
When enabled, permalinks are inserted automatically.
|