mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -06:00
Add meta tags for author, and don't allow old author
param
This commit is contained in:
parent
fe4d0979d6
commit
168c9d93ad
9
layouts/partials/author-metadata.html
Normal file
9
layouts/partials/author-metadata.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{ with .Params.authors }}
|
||||
|
||||
<meta name="author" content="{{ delimit . ", " }}">
|
||||
|
||||
{{ range . }}
|
||||
<meta property="article:author" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
@ -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>
|
||||
|
@ -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 }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user