From 1b61f09eea2a67ef791fbbabd6ed738ea2eb4c1f Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Mon, 31 Jan 2022 23:08:34 +0000
Subject: [PATCH] correct homepage regression #73
---
layouts/_default/baseof.html | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 8567a43..7a01207 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,10 +12,20 @@
{{- with $docSections }}{{- else }}
{{- $docSections = "docs" }}
{{- end }}
- {{- if or (in $docSections .Section) (and (ne site.Params.uniqueHomepage true) .IsHome) }}
+ {{ $uniqueHomepage := .IsHome }}
+ {{ if site.Params.uniqueHomepage }}
+ {{ if .IsHome }}
+ {{ $uniqueHomepage = true }}
+ {{ end }}
+ {{ else }}
+ {{ $uniqueHomepage = false }}
+ {{ end }}
+ {{- if and (in $docSections .Section) (ne $uniqueHomepage true) }}
{{- partial "document" . }}
{{- else }}
- {{- block "main" . }}{{ end }}
+ <div class="content">
+ {{- block "main" . }}{{ end }}
+ </div>
{{- end -}}
</div>
{{- partialCached "footer" . -}}
--
Gitblit v1.10.0