Add meta tags for author, and don't allow old author param

This commit is contained in:
BBaoVanC 2021-10-27 19:51:46 -05:00
parent fe4d0979d6
commit 168c9d93ad
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
3 changed files with 12 additions and 11 deletions

View File

@ -0,0 +1,9 @@
{{ with .Params.authors }}
<meta name="author" content="{{ delimit . ", " }}">
{{ range . }}
<meta property="article:author" content="{{ . }}">
{{ end }}
{{ end }}

View File

@ -32,4 +32,6 @@
{{ template "_internal/schema.html" . }}
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
{{ partial "author-metadata.html" . }}
</head>

View File

@ -20,20 +20,10 @@
{{ end }}
{{ end }}
{{ $authorString := "" }}
{{ with .Params.authors }}
{{ $authorString = delimit . ", " }}
{{ else }}
{{ with .Params.author }}
{{ $authorString = . }}
{{ end }}
{{ end }}
{{ with $authorString }}
<span class="post-meta-item">
{{ partial "icon.html" "user-circle" }}
{{ . }}
{{ delimit . ", " }}
</span>
{{ end }}