1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-21 10:02:17 +01:00

layouts/_default/baseof.html: Smarter meta author tag

Use the post's author from frontmatter, or else use the author from
the site's config. You MUST have one of these set or else you will
get an error during site generation. I think it's better to force
the user to define an author tag rather than only printing it if
it is defined because it is a good practice to help bots understand
content.
This commit is contained in:
Alan Orth 2016-09-14 14:05:36 +03:00
parent c5bacecad6
commit e8ee0c68b7
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -8,7 +8,7 @@
{{ "<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->" | safeHTML }} {{ "<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->" | safeHTML }}
<meta name="description" content="{{ .Params.description | default .Site.Params.description }}"> <meta name="description" content="{{ .Params.description | default .Site.Params.description }}">
{{ if .Site.Params.author }}<meta name="author" content="{{ .Site.Params.author }}">{{ end }} <meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
{{ if .Site.Params.google_verify_meta }}<meta name="google-site-verification" content="{{ .Site.Params.google_verify_meta }}">{{ end }} {{ if .Site.Params.google_verify_meta }}<meta name="google-site-verification" content="{{ .Site.Params.google_verify_meta }}">{{ end }}