textual improvements, use param showtoc for TOC

This commit is contained in:
Helmut Merz 2022-01-08 17:22:43 +01:00
parent dcdd716553
commit e4bfa2b3a2
2 changed files with 5 additions and 5 deletions

View file

@ -4,8 +4,8 @@
{{- $url := "" -}}
{{- $anchor := "" -}}
{{- if reflect.IsMap . -}}
{{- $anchor = .anchor}}
{{- $page = .page}}
{{- $anchor = .anchor -}}
{{- $page = .page -}}
{{- end -}}
{{- if ne $anchor "" -}}
{{- $url = printf "%s#%v" $page.Permalink $anchor -}}

View file

@ -65,8 +65,8 @@
{{- $section := or .Section "posts" -}}
{{- $header := or (i18n (printf "articles-in-%s" $section)) (i18n "articles-in-section") -}}
{{- $related := first 20 (where .Site.RegularPages "Section" $section) -}}
{{- partial "card-related"
(dict "related" $related "header" $header "id" "articles-in-section") -}}
{{- partial "card-related"
(dict "related" $related "header" $header "id" "articles-in-section") -}}
{{- end }}
{{ if .Site.Params.showBacklinks -}}
@ -75,7 +75,7 @@
(dict "related" $related "header" (i18n "backlinks") "id" "backlinks") -}}
{{- end }}
{{ if .Params.toc -}}
{{ if .Params.showtoc -}}
<div class="card mt-3">
<div class="card-header">
<h4 class="card-text">{{i18n "toc"}}</h4>