Search code examples
markdownmkdocs

Right way to change mkdocs markdown toc title "table of contents"?


I'm using mkdocs with material layout and toc markdown extension for adding a toc to the right for a documentation project.

I use up42's wiki as a template for my wiki. I would like to change the title "Table of contents".

Table of contents

The toc markdown documentation provides a parameter "title" that doesn't change anything when used in my mkdocs.yml:

markdown_extensions:
  - markdown.extensions.toc:
      baselevel: 1
      permalink: true
      title: "SOMETITLE"

Does anyone have a clue which parameter to use or how to change the title?


Solution

  • This feature was added in Material for MkDocs 7.3.5 (which you are using as can be inferred from the screenshot). The syntax is exactly as you specified in your original post:

    markdown_extensions:
      - toc:
          title: On this page
    
    

    For further guidance please refer to the documentation.