From 982e21856dac446de160ebebff02c419feac86a7 Mon Sep 17 00:00:00 2001 From: Fabien CASTERS Date: Thu, 8 Oct 2020 12:19:14 +0200 Subject: Add option `menu_item_separator` --- README.md | 1 + exampleSite/config.toml | 5 +++++ layouts/_default/baseof.html | 8 +++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6e1135a..bb82bbc 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ In your `config.toml` file, define the following variables in `params`: - `author`: Name of the author - `description`: Short description of the author - `avatar`: Path of file containing the author avatar image +- `menu_item_separator`: Separator between each menu item. HTML allowed (default: " - ") To add a menu item, add the following lines in `menu`: diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 1708f19..c551e8d 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -5,6 +5,10 @@ theme = "m10c" paginate = 5 [menu] + [[menu.main]] + identifier = "home" + name = "Home" + url = "/" [[menu.main]] identifier = "tags" name = "Tags" @@ -13,6 +17,7 @@ paginate = 5 [params] author = "John Doe" description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." + menu_item_separator = " - " [[params.social]] name = "github" url = "https://github.com/gohugoio" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 923d10e..35db6f1 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -21,9 +21,11 @@

{{ .Site.Title }}

{{- with .Site.Menus.main }} {{- end }} -- cgit v1.2.3