Demo: Hide Table of Contents
Live demonstration of the hide_toc frontmatter option.
This page demonstrates the hide_toc: true frontmatter option. The right-side table of contents is hidden, and the main content area expands to fill the available width.
What's Happening
The table of contents is hidden on this page. Here is the frontmatter used:
---
title: "Demo: Hide Table of Contents"
hide_sidebar: false
hide_toc: true
---Sidebar Still Visible
The sidebar on the left side is still visible for navigation. Only the right-side table of contents is affected.
Desktop and Mobile
Both the desktop table of contents (right sidebar) and the mobile table of contents are hidden when hide_toc: true is set.
Subsection Example
This subsection exists to demonstrate that even though the page has headings and subsections, no table of contents is generated.
When to Use
Use hide_toc: true for pages with few headings, short content, or when the extra content width is more valuable than section navigation.
See the Frontmatter reference for full documentation.
If you want readers to make that call themselves rather than fixing it per page, enable the tocToggle setting — it puts a persistent show/hide control on the pages that render the default desktop table of contents. This page is not one of them: hide_toc: true drops the TOC at build time, so there is nothing left to toggle.
See Also
Hide Sidebar — hides the left sidebar
Hide Sidebar & Table of Contents — hides both panels