Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/onweru/compose.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweru <fromweru@gmail.com>2021-05-02 18:29:03 +0300
committerweru <fromweru@gmail.com>2021-05-02 18:29:03 +0300
commit185aafcedecde5b6f0e8cb394018ebbe2ef6f774 (patch)
tree875276dfb648429cc54667bf92baa893884c4260
parent34fe37fc98472f9d8aaf1cbf766cca9bfcfd752c (diff)
refactor: make homepage sidebar optional
Signed-off-by: weru <fromweru@gmail.com>
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/_default/baseof.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 4d9b75c..614aba6 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -48,6 +48,8 @@ disableKinds = ["taxonomy", "taxonomyTerm"]
[params]
+ uniqueHomePage = true # change to false to add sidebar to homepage
+
repo = "https://github.com/onweru/compose"
time_format_blog = "Monday, January 02, 2006"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 5bbab9d..97a22eb 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -8,7 +8,7 @@
{{- partial "nav" . }}
</header>
<div class="main wrap pt-4">
- {{- if eq .Section "docs" }}
+ {{- if or (eq .Section "docs") (and (ne site.Params.uniqueHomepage true) .IsHome) }}
{{- partial "document" . }}
{{- else }}
{{- block "main" . }}{{ end }}