Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.01 KB

toc.md

File metadata and controls

33 lines (25 loc) · 1.01 KB

Table of contents documentation

Markdown

Markdown has a toc extension that can be enabled and used directly. Once enabled just add [TOC] in the markdown document where you want the table of contents to appear.

Configure the toc extension through MARKDOWN setting in pelicanconf.py:

MARKDOWN = {
    "extension_configs": {
        "markdown.extensions.toc": {
            "title": "Table of Contents"
        },
    },
}

Refer to Markdown's toc extension documentation for full settings.

If you use the i18n_subsites plugin you can override the table of contents" title:

import copy

I18N_SUBSITES = {
    "es": {
        "MARKDOWN": copy.deepcopy(MARKDOWN),  # copy to override later
    }
}
I18N_SUBSITES["es"]["MARKDOWN"]["extension_configs"]["markdown.extensions.toc"]["title"] = "Índice de contenidos"