Skip to content

Commit dbafb31

Browse files
authored
Don't show empty table of contents (#1543)
1 parent 9205f79 commit dbafb31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common-theme/layouts/partials/page-header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
or is we have made a forced list of headings,
99
then go ahead and make a TOC */}}
1010
{{ if or $forcedHeadings (and
11-
(gt .Page.WordCount 400) (.Page.TableOfContents))
11+
(gt .Page.WordCount 400) (gt (.Page.TableOfContents | findRE "<li>" | len) 1))
1212
}}
1313
{{ $hasTOC = true }}
1414
{{ $mdTOC = true }}

0 commit comments

Comments
 (0)