Set order of precedence for subtitle

Look first in the front-matter for the _index.md file, and secondly in
the parameters defined in the config.toml file.
pull/1/head
Kevin C. Coram 2019-11-19 00:09:50 -05:00
parent 64757f1ce1
commit 1f62d2a9e9
Signed by: kevin
GPG Key ID: 0342351B3D61AD35
1 changed files with 5 additions and 3 deletions

View File

@ -2,8 +2,10 @@
<main>
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Site.Params.Subtitle }}
<span class="subtitle">{{.}}</span>
{{ if .Params.Subtitle }}
<span class="subtitle">{{.Params.Subtitle}}</span>
{{ else if .Site.Params.Subtitle }}
<span class="subtitle">{{.Site.Params.Subtitle}}</span>
{{ end }}
</header>
<div class="homepage-content">
@ -17,4 +19,4 @@
{{ end }}
</div>
</main>
{{ end }}
{{ end }}