mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
fix(single.html): toc not controlled by frontmatter (redo #2428)
This commit is contained in:
@@ -31,7 +31,8 @@
|
|||||||
|
|
||||||
{{/* Body */}}
|
{{/* Body */}}
|
||||||
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
|
||||||
{{ $enableToc := .Params.showTableOfContents | default (site.Params.list.showTableOfContents | default false) }}
|
{{ $enableToc := site.Params.article.showTableOfContents | default false }}
|
||||||
|
{{ $enableToc = .Params.showTableOfContents | default $enableToc }}
|
||||||
{{ $showToc := and $enableToc (in .TableOfContents "<ul") }}
|
{{ $showToc := and $enableToc (in .TableOfContents "<ul") }}
|
||||||
{{ $topClass := cond (hasPrefix site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }}
|
{{ $topClass := cond (hasPrefix site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }}
|
||||||
{{ if $showToc }}
|
{{ if $showToc }}
|
||||||
|
|||||||
Reference in New Issue
Block a user