From: Anthony Fok Date: Mon, 16 Nov 2015 13:48:20 +0000 (-0700) Subject: Add docs/data/titles.toml to set title "Site Showcase" X-Git-Tag: v0.15~56 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=acd720df9214f8926758473c0656e2a8fcf023db;p=brevno-suite%2Fhugo Add docs/data/titles.toml to set title "Site Showcase" Idea from https://discuss.gohugo.io/t/how-to-name-list-templates/949 --- diff --git a/docs/data/titles.toml b/docs/data/titles.toml new file mode 100644 index 00000000..2348c856 --- /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 d06bf491..58922fb8 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 @@
- +