mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 00:52:19 +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:
parent
c5bacecad6
commit
e8ee0c68b7
@ -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 }}
|
||||
|
||||
<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 }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user