Generates anchor target on heading elements automatically.

0 stars out of 5

0 0 0 0 0
  • Author Taufik Nurrohman
  • Maintainer 1
  • Member
  • Version 1.0.3
Table of Contents
  1. Usage
  2. Symbol

This extension automatically generates anchor targets on headings. If you are already using the Table of Contents extension, you may not really need this extension as it does the same thing with some additional features.


You have complete control to specify your own heading ID using Markdown Extra syntax or plain HTML markup. This extension will not overwrite the specific ID you specify in the heading elements:

### Heading Level 3 {#asdf}
<h3 id="asdf">Heading Level 3</h3>
<p aria-level="3" role="heading">Heading Level 3</p>

To prevent automatic anchor insertion, add a role attribute with a value other than heading to the desired heading elements:

### (Not) Heading Level 3 {role='text'}
<h3 role="text">(Not) Heading Level 3</h3>


The default anchor symbol is a section sign character. You can use your own anchor symbol by setting the value of the CSS variable --anchor (yes, the anchor text is actually just a CSS pseudo-element):

:root {
  --anchor: '\2693';


No comments yet.