From 3c01130d0a33006665a5762f151af6016eb02fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Merino=20Hern=C3=A1ndez?= Date: Tue, 6 Sep 2022 02:17:17 +0200 Subject: [PATCH] Include an option to remove the navigation menu (#340) * Add showMenu option The showMenu option allows users to remove the navigation menu if necessary. * Update README.md This commit will update the README.md file to include information about the showMenu option. --- README.md | 2 ++ exampleSite/config.toml | 1 + layouts/partials/nav.html | 2 ++ 3 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 36271b4..deef066 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,8 @@ See the [hugo documentation](https://gohugo.io/content-management/multilingual/) Introduction contains a default menu. If you want to override this, you can do so by defining a `menu.main` in `config.toml`. +Optionally, you can disable this menu by setting `showMenu` to `false` in your `config.toml`. + ## Contact section clock Introduction can optionally show your current local time in your [contact section](https://hugo-introduction.netlify.app/#contact). This uses vanilla JS and variables you provide. You can set this up by copying the settings in the exampleSite `config.toml` for `localTime`, `timeZone`, and `timeFormat`. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6334faf..62b4458 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,6 +7,7 @@ DefaultContentLanguage = "en" # Default language fo [params] themeStyle = "auto" # Choose "light" or "dark" or "auto" favicon = "/img/fav.ico" # Path to favicon file + showMenu = true # Show navigation menu showRSSButton = false # Show rss button in navigation fadeIn = true # Turn on/off the fade-in effect fadeInIndex = false # Turn on/off the fade-in effect on the index page even if fade-in was otherwise turned off diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index bdfd931..c38c0b6 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,3 +1,4 @@ +{{ if .Site.Params.showMenu | default true }}

@@ -115,3 +116,4 @@
+{{ end }}