Add combine_page_and_site_title option
If true, it will e.g. change the title tag for the Legal page to <title>Legal | Jane Doe - Nutrition Coach & Chef Consultant</title> Signed-off-by: Daniel Holbach <daniel.holbach@gmail.com>
This commit is contained in:
parent
ae3f16bd93
commit
b88d13e7f0
2 changed files with 8 additions and 0 deletions
|
|
@ -63,6 +63,10 @@ enableEmoji = true
|
|||
|
||||
# Options used for automatic image generation. see: https://gohugo.io/content-management/image-processing/
|
||||
image_options = "webp q90 lanczos photo"
|
||||
|
||||
# Use "page_title | site_title" for <title> tags
|
||||
# e.g. <title>Legal | Jane Doe - Nutrition Coach & Chef Consultant</title>
|
||||
combine_page_and_site_title = false
|
||||
|
||||
[params.footer]
|
||||
# Show contact icons for email/phone (if specified) in the footer of the page
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
|
||||
{{ if and site.Params.combine_page_and_site_title .Title .Site.Title }}
|
||||
<title>{{ .Title | plainify }} | {{ .Site.Title | plainify }}</title>
|
||||
{{ else }}
|
||||
{{ with or .Title .Site.Title | plainify }}
|
||||
<title>{{ . }}</title>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with resources.Get .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ .RelPermalink }}" type="{{ .MediaType.Type }}" />{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue