ref: acd720df9214f8926758473c0656e2a8fcf023db
parent: 5c6d8c57b957b486fdb9dab2015362118ee8f126
author: Anthony Fok <[email protected]>
date: Mon Nov 16 01:48:20 EST 2015
Add docs/data/titles.toml to set title "Site Showcase" Idea from https://discuss.gohugo.io/t/how-to-name-list-templates/949
--- /dev/null
+++ b/docs/data/titles.toml
@@ -1,0 +1,2 @@
+[Showcase]
+title = "Site Showcase"
--- a/docs/layouts/partials/header.html
+++ b/docs/layouts/partials/header.html
@@ -7,9 +7,9 @@
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ .Hugo.Generator }}
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+{{ .Scratch.Add "title" "" }}{{ if isset .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}}
+ <title>Hugo - {{ .Scratch.Get "title" }}</title>
- <title>{{.Title}}</title>
-
<link href="/css/bootstrap-theme.css" rel="stylesheet">
<link href="/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="/css/style.css" rel="stylesheet">
@@ -42,7 +42,7 @@
</div>
<div class="nav title-row" id="top_menu">
- <h1 class="nav top-menu">{{.Title}}</h1>
+ <h1 class="nav top-menu">{{ .Scratch.Get "title" }}</h1>
</div>
</header>
<!--header end-->
@@ -78,7 +78,7 @@
<div class="col-md-10">
<section class="panel">
<!--<header class="panel-heading">-->
- <!--<h3>{{.Title}}</h3>-->
+ <!--<h3>{{ .Scratch.Get "title" }}</h3>-->
<!--</header>-->
<div class="panel-body">
<div class="row">