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:
parent
421ee67f24
commit
489b868ca0
2 changed files with 2 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue