From acd720df9214f8926758473c0656e2a8fcf023db Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Mon, 16 Nov 2015 06:48:20 -0700 Subject: [PATCH] Add docs/data/titles.toml to set title "Site Showcase" Idea from https://discuss.gohugo.io/t/how-to-name-list-templates/949 --- docs/data/titles.toml | 2 ++ docs/layouts/partials/header.html | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 docs/data/titles.toml diff --git a/docs/data/titles.toml b/docs/data/titles.toml new file mode 100644 index 000000000..2348c8561 --- /dev/null +++ b/docs/data/titles.toml @@ -0,0 +1,2 @@ +[Showcase] +title = "Site Showcase" diff --git a/docs/layouts/partials/header.html b/docs/layouts/partials/header.html index d06bf4913..58922fb82 100644 --- a/docs/layouts/partials/header.html +++ b/docs/layouts/partials/header.html @@ -7,8 +7,8 @@ {{ with .Site.Params.author }}{{ end }} {{ .Hugo.Generator }} - - {{.Title}} +{{ .Scratch.Add "title" "" }}{{ if isset .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}} + Hugo - {{ .Scratch.Get "title" }} @@ -42,7 +42,7 @@ @@ -78,7 +78,7 @@
- +