Skip to content

Commit f124384

Browse files
committed
fix: suppress single page scaffolding without regular content
1 parent 714c00e commit f124384

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

layouts/single.html

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,23 @@ <h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper $.Section
1717

1818
{{ $blocks | safeHTML }}
1919

20-
<div class="container-xxl flex-fill p-4 px-xxl-0">
21-
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
22-
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">
23-
{{ $sidebar | safeHTML }}
24-
</div>
25-
<div class="col-12 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 mb-5 py-4">
26-
{{ .Render "header" }}
20+
{{ if or (not $blocks) (gt (len .RawContent) 0) }}
21+
<div class="container-xxl flex-fill p-4 px-xxl-0">
22+
<div class="row row-cols-1 row-cols-{{ $breakpoint.current }}-2 row-cols-{{ $breakpoint.next }}-3">
23+
<div class="col col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.next }}-block sidebar-overflow sticky-top pt-5">
24+
{{ $sidebar | safeHTML }}
25+
</div>
26+
<div class="col-12 col-{{ $breakpoint.current }}-9 col-{{ $breakpoint.next }}-8 mb-5 py-4">
27+
{{ .Render "header" }}
2728

28-
{{ .Render "body" }}
29-
30-
{{ .Render "footer" }}
31-
</div>
32-
<div class="col col-{{ $breakpoint.current }}-3 col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.current }}-block pt-5">
33-
{{ .Render "toc" }}
29+
{{ .Render "body" }}
30+
31+
{{ .Render "footer" }}
32+
</div>
33+
<div class="col col-{{ $breakpoint.current }}-3 col-{{ $breakpoint.next }}-2 d-none d-{{ $breakpoint.current }}-block pt-5">
34+
{{ .Render "toc" }}
35+
</div>
3436
</div>
3537
</div>
36-
</div>
38+
{{ end }}
3739
{{ end -}}

0 commit comments

Comments
 (0)