mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-12-18 10:25:58 +01:00
b955abab6e
* Remove deprecated Markdown config format in docs. Support for including Markdown extension configs in the extension name has been [deprecated][1] and will not work in any future released of Python-Markdown. MkDocs has offered full support for defining extension configs [since version 0.13][2] and everyone should be using that format. [1]: https://pythonhosted.org/Markdown/release-2.6.html#extension-configuration-as-part-of-extension-name-deprecated [2]: http://www.mkdocs.org/about/release-notes/#other-changes-and-additions-to-version-0130 * Update codehilite Markdown config * Update TOC Markdown configs * Update pymdown Markdown configs
34 lines
870 B
Markdown
34 lines
870 B
Markdown
# Permalinks
|
|
|
|
Permalinks are a feature of the [Table of Contents][1] extension, which is part
|
|
of the standard Markdown library. The extension inserts an anchor at the end of
|
|
each headline, which makes it possible to directly link to a subpart of the
|
|
document.
|
|
|
|
[1]: https://pythonhosted.org/Markdown/extensions/toc.html
|
|
|
|
## Installation
|
|
|
|
To enable permalinks, add the following to your `mkdocs.yml`:
|
|
|
|
``` yaml
|
|
markdown_extensions:
|
|
- toc:
|
|
permalink: true
|
|
```
|
|
|
|
This will add a link containing the paragraph symbol `¶` at the end of each
|
|
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
|
|
markdown_extensions:
|
|
- toc:
|
|
permalink: Link
|
|
```
|
|
|
|
## Usage
|
|
|
|
When enabled, permalinks are inserted automatically.
|