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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Merino Hernández <merinhunter94@gmail.com>2022-09-06 03:17:17 +0300
committerGitHub <noreply@github.com>2022-09-06 03:17:17 +0300
commit3c01130d0a33006665a5762f151af6016eb02fae (patch)
treed8865ec7b22d80edf80753f4e5d192567d4cc57f
parente7e8344a512c12c02bd7bc8875067af8f737069a (diff)
Include an option to remove the navigation menu (#340)HEADmaster
* 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.
-rw-r--r--README.md2
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/nav.html2
3 files changed, 5 insertions, 0 deletions
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 }}
<!-- Begin Nav bar -->
<div class="container">
<hr>
@@ -115,3 +116,4 @@
<hr>
</div>
<!-- End Nav bar -->
+{{ end }}