diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 46c128f33d..36516b32bb 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -14,6 +14,7 @@ relativeURLs = true author = "Sören Weber" showVisitedLinks = true disableBreadcrumb = false + disableToc = false disableNextPrev = false disableLandingPageButton = true disableMermaid = false diff --git a/exampleSite/content/basics/configuration/_index.en.md b/exampleSite/content/basics/configuration/_index.en.md index 40e0c47d6d..e99907a730 100644 --- a/exampleSite/content/basics/configuration/_index.en.md +++ b/exampleSite/content/basics/configuration/_index.en.md @@ -47,6 +47,8 @@ Note that some of these parameters are explained in details in other sections of disableLanguageSwitchingButton = false # Hide breadcrumbs in the header and only show the current page title disableBreadcrumb = true + # Hide table of contens menu in the header of all pages + disableToc = true # If set to true, prevents Hugo from including the Mermaid module if not needed (will reduce load times and traffic) disableMermaid = false # Specifies the remote location of the Mermaid js diff --git a/exampleSite/content/basics/migration/_index.en.md b/exampleSite/content/basics/migration/_index.en.md index 14a2f2ac94..12b6176957 100644 --- a/exampleSite/content/basics/migration/_index.en.md +++ b/exampleSite/content/basics/migration/_index.en.md @@ -16,6 +16,7 @@ This document shows you what's new in the latest release. For a detailed list of ## 2.8.0 - **New**: The theme now supports favicons served from `static/images/` named as `favicon` or `logo` in SVG, PNG or ICO format [out of the box]({{% relref "basics/customization/#change-the-favicon" %}}). An overridden partial `layouts/partials/favicon.html` may not be necessary anymore in most cases. +- **New**: Parameter "disableToc" in config.toml in section [params]. Now you can disable the TOC feature globally for all Pages if you don't want use it. ## 2.7.0 diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a156aa4fe4..6e90d138e0 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -55,7 +55,7 @@ {{- end }} {{- end }} - {{- $toc := (and (not .Params.disableToc) (not .Params.chapter)) }} + {{- $toc := (and (not .Params.disableToc) (not .Site.Params.disableToc) (not .Params.chapter)) }}