Skip to content

Commit

Permalink
add auto deep anchors / permalinks for headers
Browse files Browse the repository at this point in the history
also add pilcrow permalinks

See:

* https://python-markdown.github.io/extensions/toc/
* https://docs.getpelican.com/en/latest/settings.html#basic-settings

Sorta related, not really, just saving for later:

* https://stackoverflow.com/questions/63788415/show-header-permalink-on-hover-pelican (that's about restructuredText, but there is some info about markdown, although it is incomplete as is leaves out defaults)
* getpelican/pelican-plugins#1397 (repo is deprecated)
* getpelican/pelican#2968 (added some helpful info for next person searching)
  • Loading branch information
meonkeys committed May 25, 2024
1 parent f15639c commit 3e92fad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pelican/website/pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,13 @@
}

TYPOGRIFY = True

MARKDOWN = {
'extension_configs': {
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
'markdown.extensions.toc': {'permalink': True},
},
'output_format': 'html5',
}

0 comments on commit 3e92fad

Please sign in to comment.