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

github.com/blankoworld/hugo_theme_adam_eve.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier DOSSMANN <git@dossmann.net>2019-04-24 17:27:38 +0300
committerOlivier DOSSMANN <git@dossmann.net>2019-04-24 17:27:38 +0300
commita2c20bfb0b9c926396e82c185677fa5b351d54c6 (patch)
tree874a617044c99700c1c0041d526bd0e16105c2a5
parent80c2eb3c6d65b12cca77412edf5aeb452b090f18 (diff)
Fix #2 - Add a homepage menu bar
-rw-r--r--README.md8
-rw-r--r--layouts/index.html5
2 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index c629c4f..4d152a2 100644
--- a/README.md
+++ b/README.md
@@ -122,6 +122,14 @@ Pay attention to read this **entire page** before applying what you read!
{{% /note %}}
```
+### Homepage menu
+
+By default a menu is displayed on Homepage. You can disable it. Use `nohomebar` in **config.toml** like this:
+
+```ini
+[params] nohomebar = true
+```
+
## Contributing
Did you found a bug or got an idea for a new feature? Feel free to use the [issue tracker](//github.com/blankoworld/hugo_theme_adam_eve/issues) to let me know. Or make directly a [pull request](//github.com/blankoworld/hugo_theme_adam_eve/pulls).
diff --git a/layouts/index.html b/layouts/index.html
index 577555c..dd392f7 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -6,6 +6,11 @@
</head>
<body>
+ {{ if isset .Site.Params "nohomebar" }}
+ <!-- No homepage menu bar -->
+ {{ else if .Site.Menus.main }}
+ {{ partial "menu.html" . }}
+ {{ end }}
<header style="text-align: center;">
{{ partial "site_title.html" . }}
<hr />