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.
This commit is contained in:
Sergio Merino Hernández 2022-09-06 02:17:17 +02:00 committed by GitHub
parent e7e8344a51
commit 3c01130d0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -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`.

View file

@ -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

View file

@ -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 }}