mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -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" . }}
|
{{ template "_internal/schema.html" . }}
|
||||||
|
|
||||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||||
|
|
||||||
|
{{ partial "author-metadata.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
@ -20,20 +20,10 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $authorString := "" }}
|
|
||||||
|
|
||||||
{{ with .Params.authors }}
|
{{ with .Params.authors }}
|
||||||
{{ $authorString = delimit . ", " }}
|
|
||||||
{{ else }}
|
|
||||||
{{ with .Params.author }}
|
|
||||||
{{ $authorString = . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ with $authorString }}
|
|
||||||
<span class="post-meta-item">
|
<span class="post-meta-item">
|
||||||
{{ partial "icon.html" "user-circle" }}
|
{{ partial "icon.html" "user-circle" }}
|
||||||
{{ . }}
|
{{ delimit . ", " }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user