{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/developer-portal/page-table-of-contents/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#page-table-of-contents\" aria-label=\"page table of contents permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"page-table-of-contents\"></div>Page table of contents</h1>\n<p>When the <code class=\"language-text\">siteConfig.yaml</code> file has <code class=\"language-text\">enableToc: true</code> then a page table of contents will appear on the right-hand side when there is more than one header.</p>\n<p>For your training exercise, you will try to disable the page table of contacts by default across the website.</p>\n<p>Go into the <code class=\"language-text\">siteConfig.yaml</code> file and change <code class=\"language-text\">enableToc: true</code> to <code class=\"language-text\">enableToc: false</code>. ✅</p>\n<p>Be sure to save the <code class=\"language-text\">siteConfig.yaml</code>. Did you notice the page table of contents disappear?</p>\n<p>Now, enable it on this page, without enabling it across every page by default.</p>\n<p>To do that, you'll need to learn about front matter.\nFront matter is at the top of a markdown file before the displayed content.\nYou can control the title tags, meta keywords and description tags, and more.\nWe will use it to enable the table of contents.</p>\n<p>Add this snippet to the very top of the page.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"8308681051917066000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`---\nenableToc: true\n---`, `8308681051917066000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-8308681051917066000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"md\"><pre class=\"language-md\"><code class=\"language-md\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\"><span class=\"token key atrule\">enableToc</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></span>\n<span class=\"token punctuation\">---</span></span></code></pre></div>\n      </div>\n<p>✅✅✅</p>\n<p>Now, we'll try the reverse.</p>\n<p>In <code class=\"language-text\">siteConfig.yaml</code>, change to <code class=\"language-text\">enableToc: true</code>.</p>\n<p>Then try and disable the page table of contents on this page.</p>\n<p>Could you figure it out?</p>\n<p>Great!</p>\n<h1 style=\"position:relative;\"><a href=\"#rock\" aria-label=\"rock permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"rock\"></div>Rock</h1>\n<p>I like rocks.</p>\n<h1 style=\"position:relative;\"><a href=\"#paper\" aria-label=\"paper permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"paper\"></div>Paper</h1>\n<p>I love paper.</p>\n<h1 style=\"position:relative;\"><a href=\"#scissors\" aria-label=\"scissors permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"scissors\"></div>Scissors</h1>\n<p>Ugh... I am left-handed.</p>","headings":[{"value":"Page table of contents","depth":1},{"value":"Rock","depth":1},{"value":"Paper","depth":1},{"value":"Scissors","depth":1}]},"contentItem":{"data":{"lastModified":"2025-12-17T21:55:39.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":true,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"41b2d9e5-31ee-5a62-b3f5-e7605c63c3a8__redocly content/developer-portal/page-table-of-contents/","seo":{"title":"Page table of contents","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null},"pageId":"developer-portal/page-table-of-contents.md","pageBaseUrl":"/developer-portal/page-table-of-contents","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Page table of contents","id":"page-table-of-contents"},{"depth":1,"value":"Rock","id":"rock"},{"depth":1,"value":"Paper","id":"paper"},{"depth":1,"value":"Scissors","id":"scissors"}]},"data":{"title":""},"catalogInfo":null,"link":"/developer-portal/page-table-of-contents/","sidebarName":"","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1180902673","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3743992808","561138138"]}