From 4721b523caa2368ad77f593157257f13fd984311 Mon Sep 17 00:00:00 2001 From: Cosmin Humeniuc Date: Sat, 25 Aug 2018 18:11:15 +0300 Subject: [PATCH] Added 'header_visible' parameter to allow switching off the header. --- exampleSite/config.toml | 3 +++ layouts/_default/baseof.html | 2 ++ 2 files changed, 5 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4513c4e..99e5024 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -37,6 +37,9 @@ paginate = 5 # Description/subtitle for homepage (can be Markdown) description = "A simple Hugo theme based on the Bootstrap v4 blog example." + # Show header (default: true) + #header_visible = true + # Format dates with Go's time formatting date_format = "Mon Jan 02, 2006" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ced209c..3d37029 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -47,6 +47,7 @@ {{ end }} {{ block "header" . }} + {{ if (ne ($.Param "header_visible") false) }}

{{ .Site.Title | safeHTML }}

@@ -54,6 +55,7 @@
{{ end }} + {{ end }} {{ block "body" . }}