1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 09:20:52 +01:00
mkdocs-material/docs/extensions/permalinks.md
Waylan Limberg b955abab6e Removed deprecated Markdown config format in docs
* 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
2017-10-16 19:13:05 +02:00

870 B

Permalinks

Permalinks are a feature of the Table of Contents 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.

Installation

To enable permalinks, add the following to your mkdocs.yml:

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_extensions:
  - toc:
      permalink: Link

Usage

When enabled, permalinks are inserted automatically.