From 185aafcedecde5b6f0e8cb394018ebbe2ef6f774 Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Sun, 02 May 2021 15:29:03 +0000
Subject: [PATCH] refactor: make homepage sidebar optional
---
exampleSite/config.toml | 2 ++
layouts/_default/baseof.html | 2 +-
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 @@
[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 }}
--
Gitblit v1.10.0