I know in Pelican I can use the [TOC]
line for table of contents, but what do I need to do to enable that?
I have to change the MARKDOWN
setting in pelicanconf.py
(settings docs are here), but how does that change look like?
Add a markdown.extensions.toc
key to the MARKDOWN
dictionary in your pelican configuration file. The key should correspond to a dictionary of configuration options for the Markdown extension.
The following MARKDOWN
dictionary adds a minimal configuration for the table of contents to the default MARKDOWN
dictionary specified in the Pelican documentation:
MARKDOWN = {
'extension_configs': {
'markdown.extensions.toc': {
'title': 'Table of contents:'
},
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
},
'output_format': 'html5',
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With