2016-10-30 11:26:55 +01:00
|
|
|
# Permalinks
|
|
|
|
|
2016-12-18 13:29:03 +01:00
|
|
|
Permalinks are a feature of the [Table of Contents][1] extension, which is part
|
2016-11-02 19:21:14 +01:00
|
|
|
of the standard Markdown library. The extension inserts an anchor at the end of
|
2016-10-30 11:26:55 +01:00
|
|
|
each headline, which makes it possible to directly link to a subpart of the
|
|
|
|
document.
|
|
|
|
|
2016-12-18 13:29:03 +01:00
|
|
|
[1]: https://pythonhosted.org/Markdown/extensions/toc.html
|
|
|
|
|
2016-10-30 11:26:55 +01:00
|
|
|
## Installation
|
|
|
|
|
2016-11-02 19:21:14 +01:00
|
|
|
To enable permalinks, add the following to your `mkdocs.yml`:
|
2016-10-30 11:26:55 +01:00
|
|
|
|
2016-11-02 19:21:14 +01:00
|
|
|
``` yaml
|
|
|
|
markdown_extensions:
|
2017-10-16 19:13:05 +02:00
|
|
|
- toc:
|
|
|
|
permalink: true
|
2016-10-30 11:26:55 +01:00
|
|
|
```
|
|
|
|
|
2016-12-15 15:55:40 +01:00
|
|
|
This will add a link containing the paragraph symbol `¶` at the end of each
|
2016-10-30 11:26:55 +01:00
|
|
|
headline (exactly like on the page you're currently viewing), which the
|
|
|
|
Material theme will make appear on hover. In order to change the text of the
|
|
|
|
permalink, a string can be passed, e.g.:
|
|
|
|
|
|
|
|
``` markdown
|
2016-11-02 19:21:14 +01:00
|
|
|
markdown_extensions:
|
2017-10-16 19:13:05 +02:00
|
|
|
- toc:
|
|
|
|
permalink: Link
|
2016-10-30 11:26:55 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
When enabled, permalinks are inserted automatically.
|