From a28a76767a00a08cfdeee2f3cf6cef55498901ff Mon Sep 17 00:00:00 2001 From: Jesper Kolbeck Date: Sun, 6 Feb 2022 18:15:49 +0100 Subject: [PATCH] Rename title overwrite properties to header_menu_title and navigation_menu_title --- archetypes/homepage.md | 10 +++++++--- exampleSite/content/homepage/services.md | 3 ++- layouts/index.html | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/archetypes/homepage.md b/archetypes/homepage.md index b2e444a..2973c4a 100644 --- a/archetypes/homepage.md +++ b/archetypes/homepage.md @@ -1,9 +1,13 @@ --- title: '{{ replace .Name "-" " " | title }}' -# The "name" value will be used as text for buttons and fixed menu items. -# The "title" value will be used if value for "name" is not provided. -#name: 'Short Title' +# The "header_menu_title" value will be used as text for header buttons. +# The "title" value will be used if value for "header_menu_title" is not provided. +#header_menu_title: 'Short Menu Title' + +# The "navigation_menu_title" value will be used as text for fixed menu items. +# The "title" value will be used if value for "navigation_menu_title" is not provided. +#navigation_menu_title: 'Short Menu Title' # The "weight" will determine where this section appears on the "homepage". # A bigger weight will place the content more towards the bottom of the page. diff --git a/exampleSite/content/homepage/services.md b/exampleSite/content/homepage/services.md index c21d2a0..f54e691 100644 --- a/exampleSite/content/homepage/services.md +++ b/exampleSite/content/homepage/services.md @@ -1,6 +1,7 @@ --- title: "The Services I Offer" -name: "My Services" +header_menu_title: "My Services" +navigation_menu_title: "Services" weight: 2 header_menu: true --- diff --git a/layouts/index.html b/layouts/index.html index 4e6750f..39b8dcb 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,7 @@ {{ range where $sections ".Params.header_menu" "eq" true }} {{ $button_title := .Title }} - {{ with .Params.Name }} + {{ with .Params.header_menu_title }} {{ $button_title = . }} {{ end }} {{ $button_title }} @@ -26,7 +26,7 @@ {{ range $index_val, $elem_val := $sections }} {{ $fnav_title := .Title }} - {{ with .Params.Name }} + {{ with .Params.navigation_menu_title }} {{ $fnav_title = . }} {{ end }}