diff options
author | Gavin Rehkemper <gavinr@users.noreply.github.com> | 2019-10-09 11:39:50 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2019-10-09 11:39:50 +0300 |
commit | 7a84b69b223dd9f69c58b90164ff3b35a4af3161 (patch) | |
tree | 91fc049b775e6e04984ece660858b760d972bad2 /README.md | |
parent | 636e30ecbb2b336712f054320eb0891513e9d9f3 (diff) |
Add dynamic header menu using Hugo Menu's
Added dynamic header menu, Hugo-style
Template from https://gohugo.io/templates/menu-templates
Removed unused i18n
See #29
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -36,6 +36,42 @@ Alternatively, you can tell Hugo to use the theme with the `server` command. hugo server -t tale ``` +#### Menu + +The top menu uses [Hugo Menus](https://gohugo.io/content-management/menus/), with the name of the menu being `main`. To turn on the menu, follow the steps there - you can either add something like this to the front-matter of your pages: + +``` +--- +menu: "main" +--- +``` + +... or you can add a menu section to your `config` file: + +``` +sectionPagesMenu = "main" +``` + +Or if you want more control, add a specific entry for each item in your menu: + +``` +[menu] + [[menu.main]] + identifier = "about" + name = "About" + title = "About" + url = "/about/" + weight = 0 + [[menu.main]] + identifier = "posts" + name = "Posts" + title = "Posts" + url = "/posts/" + weight = 0 +``` + +For menu internationalization/translation, see [Multilingual Mode: Menus](https://gohugo.io/content-management/multilingual/#menus). + ### Additional information For more information, read the official [setup guide](https//gohugo.io/overview/installing/) of Hugo. |