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?
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',
}
[TOC]
to your article/page. –
Gigot [TOC]
as per @nwly's comment). –
Shorthand © 2022 - 2024 — McMap. All rights reserved.