diff --git a/README.md b/README.md index 7b7cf3bfa..426784f49 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,10 @@ paginate = 10 keywords = "homepage, blog" images = [""] + # Configure header / top menu on top of each page + disableHeaderOnHome = false # Hides header on homepage + headerCssClasses = [ "" ] # Append CSS classes to header element + [taxonomies] category = "blog" tag = "tags" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index da7723f4a..6ee295739 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -121,6 +121,13 @@ disableHugoGeneratorInject = false "Made with ❤ by Djordje Atlialp" ] + # Custom header + [params.header] + # Set true to hide header on homepage + disableHeaderOnHome = false + # Add names to render additional CSS classes on
element + headerCssClasses = [ "" ] + # Colors for favicons # [params.favicon.color] diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 46651d4ef..5ec0ef66e 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,5 @@ -
+{{ if not (or .Params.disableHeader (and .Site.Params.header.disableOnHome .IsHome)) }} +
{{ partial "logo.html" . }} @@ -19,3 +20,4 @@
+{{ end }} \ No newline at end of file