tocMaxDepth

Usage

This option is dependant on, and related to enableToc: true. Use it to set the maximum depth (amount of heading levels) displayed in the table of contents. The value of tocMaxDepth must be configured as an integer. The default value is 4.

  • To modify all pages in the portal, add it to the top level of the siteConfig.yaml file.
  • To override the site-wide configuration, add it to the front matter of specific MD(X) pages.

Read more about ToC configuration.

Related options

The enableToc option is a prerequisite for tocMaxDepth. It must be set to true, either site-wide in siteConfig.yaml or in the front matter of the specific MD(X) file you're modifying.

Examples

In siteConfigIn front matter
meta:
  title: Example Developer Portal
  description: Learn how to work with Example APIs
enableToc: true
tocMaxDepth: 4
---
title: Markdown example
description: GitHub-flavored Markdown example
enableToc: true
tocMaxDepth: 2
---

Example text