Skip to content

Commit bc337c3

Browse files
authored
DEV/OP: make is possible to hide in-page TOC with frontmatter (#1584)
* DEV/OP: make is possible to hide in-page TOC with frontmatter * integrate pages too
1 parent eb21e88 commit bc337c3

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

layouts/develop/single.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ <h1>
3636
{{ partial "feedback.html" . }}
3737
</section>
3838
</div>
39-
{{ partial "docs-toc.html" . }}
39+
{{ if not .Params.hideTOC }}
40+
{{ partial "docs-toc.html" . }}
41+
{{ end }}
4042
{{ partial "scripts.html" . }}
4143
</main>
4244
{{ end }}

layouts/integration/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ define "main" }}
66
<main class="docs w-full max-w-[1920px] mx-auto px-5 flex flex-col md:flex-row overflow-hidden">
77
{{ partial "docs-nav.html" . }}
8-
<div class="py-12 md:pl-4 xl:px-16 overflow-hidden">
8+
<div class="w-full py-12 md:pl-4 xl:px-16 overflow-hidden">
99
{{ partial "breadcrumbs" . }}
1010
<section class="prose w-full py-12 max-w-none">
1111
<h1>{{ .Title }}</h1>

layouts/integration/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ define "main" }}
66
<main class="docs w-full max-w-[1920px] mx-auto px-5 flex flex-col md:flex-row overflow-hidden">
77
{{ partial "docs-nav.html" . }}
8-
<div class="py-12 md:pl-4 xl:px-16 overflow-hidden">
8+
<div class="w-full py-12 md:pl-4 xl:px-16 overflow-hidden">
99
{{ partial "breadcrumbs" . }}
1010
<section class="prose w-full py-12 max-w-none">
1111
<h1>{{ .Title }}</h1>

layouts/operate/list.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ define "main" }}
66
<main class="docs w-full max-w-[1920px] mx-auto px-5 flex flex-col md:flex-row overflow-hidden">
77
{{ partial "docs-nav.html" . }}
8-
<div class="py-12 md:pl-4 xl:px-16 overflow-hidden">
8+
<div class="w-full py-12 md:pl-4 xl:px-16 overflow-hidden">
99
{{ partial "breadcrumbs" . }}
1010
<section class="prose w-full py-12 max-w-none">
1111
<h1>
@@ -92,7 +92,9 @@ <h1>
9292
{{ partial "feedback.html" . }}
9393
</section>
9494
</div>
95-
{{ partial "docs-toc.html" . }}
95+
{{ if not .Params.hideTOC }}
96+
{{ partial "docs-toc.html" . }}
97+
{{ end }}
9698
{{ partial "scripts.html" . }}
9799
</main>
98100
{{ end }}

layouts/operate/single.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ define "main" }}
66
<main class="docs w-full max-w-[1920px] mx-auto px-5 flex flex-col md:flex-row overflow-hidden">
77
{{ partial "docs-nav.html" . }}
8-
<div class="py-12 md:pl-4 xl:px-16 overflow-hidden">
8+
<div class="w-full py-12 md:pl-4 xl:px-16 overflow-hidden">
99
{{ partial "breadcrumbs" . }}
1010
<section class="prose w-full py-12 max-w-none">
1111
<h1>{{ .Title }}</h1>
@@ -82,7 +82,9 @@ <h1>{{ .Title }}</h1>
8282
{{ partial "feedback.html" . }}
8383
</section>
8484
</div>
85-
{{ partial "docs-toc.html" . }}
85+
{{ if not .Params.hideTOC }}
86+
{{ partial "docs-toc.html" . }}
87+
{{ end }}
8688
{{ partial "scripts.html" . }}
8789
</main>
8890
{{ end }}

0 commit comments

Comments
 (0)