Copying layouts from old theme to new
This commit is contained in:
40
layouts/partials/schema.html
Normal file
40
layouts/partials/schema.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<script type="application/ld+json">
|
||||
[
|
||||
{{- if eq .Section "post" }}
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": {{ .Title }},
|
||||
"image": {{ index .Params.images 0 | absURL }},
|
||||
"datePublished": {{ .PublishDate }},
|
||||
"dateModified": {{ .Lastmod }},
|
||||
"wordCount": {{ .WordCount }},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": {{ .Site.Params.author }}
|
||||
},
|
||||
"mainEntityOfPage": { "@type": "WebPage" },
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": {{ .Site.Params.header }},
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": {{ .Site.Params.logo | absURL }}
|
||||
}
|
||||
},
|
||||
"description": {{ .Summary | plainify | safeHTML }},
|
||||
"keywords": [{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}]
|
||||
},
|
||||
{{- end }}
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
"name": {{ .Site.Params.header }},
|
||||
"url": {{ .Site.BaseURL }},
|
||||
"sameAs": [
|
||||
"https://twitter.com/{{ .Site.Params.twitter }}",
|
||||
"https://github.com/{{ .Site.Params.github }}"
|
||||
]
|
||||
}
|
||||
]
|
||||
</script>
|
||||
Reference in New Issue
Block a user