Merge branch 'global-disableTOC' of git://github.com/BITS-Training/hugo-theme-relearn into BITS-Training-global-disableTOC

This commit is contained in:
Sören Weber 2021-11-03 20:03:55 +01:00
commit 057bb2a52b
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
4 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@ relativeURLs = true
author = "Sören Weber"
showVisitedLinks = true
disableBreadcrumb = false
disableToc = false
disableNextPrev = false
disableLandingPageButton = true
disableMermaid = false

View file

@ -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

View file

@ -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

View file

@ -55,7 +55,7 @@
</div>
{{- end }}
{{- end }}
{{- $toc := (and (not .Params.disableToc) (not .Params.chapter)) }}
{{- $toc := (and (not .Params.disableToc) (not .Site.Params.disableToc) (not .Params.chapter)) }}
<div id="breadcrumbs">
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">