Allow defining a custom header text for the home page

Allow defining a custom header text for the home page
This commit is contained in:
Michael Romero 2018-04-12 22:05:45 -07:00
commit 489b868ca0
2 changed files with 2 additions and 1 deletions

View file

@ -14,6 +14,7 @@ pygmentsCodefencesGuessSyntax = true
#googleAnalytics = "XXX"
[Params]
# homeTitle = "Beautiful Hugo Theme" # Set a different text for the header on the home page
subtitle = "Build a beautiful and simple website in minutes"
logo = "img/avatar-icon.png"
favicon = "img/favicon.ico"

View file

@ -1,5 +1,5 @@
{{ if .IsHome }}
{{ if isset .Params "title" }}{{ $.Scratch.Set "title" .Title }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
{{ else }}