First, you need to enable the toc
extension for Markdown in your Pelican configuration.
MARKDOWN = {
'extension_configs': {
'markdown.extensions.toc': {}
}
}
Then enable permalink
option available for the toc
extension.
MARKDOWN = {
'extension_configs': {
'markdown.extensions.toc': {
'permalink': 'true',
}
}
}
Enabling the permalink
option will provide direct links to each heading.
Hover over following example heading to see the permalink.
Example Heading
You would get this,
Tip
When set to True the paragraph symbol ¶
or ¶
is used by Python markdown.
This becomes part of the RSS feed.
We recommend setting permalink option to a space.
MARKDOWN = {
'extension_configs': {
'markdown.extensions.toc': {
'permalink': ' ',
}
}
}