Squashed 'themes/codex/' content from commit da2d16a
git-subtree-dir: themes/codex git-subtree-split: da2d16a4f95fc37e71548dfc139d51e22ebb09bd
This commit is contained in:
42
layouts/partials/seo-schema.html
Normal file
42
layouts/partials/seo-schema.html
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
<!-- JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{{ if and (.IsPage) (eq .Section "blog") }}
|
||||
{
|
||||
"@context" : "http://schema.org",
|
||||
"@type" : "BlogPosting",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Site.BaseURL }}"
|
||||
},
|
||||
"articleSection" : "{{ .Section }}",
|
||||
"name" : "{{ .Title }}",
|
||||
"headline" : "{{ .Title }}",
|
||||
"description" : "{{ .Description }}",
|
||||
"inLanguage" : "en-US",
|
||||
"author" : "{{ .Site.Params.name }}",
|
||||
"creator" : "{{ .Site.Params.name }}",
|
||||
"publisher": "{{ .Site.Params.name }}",
|
||||
"accountablePerson" : "{{ .Site.Params.name }}",
|
||||
"copyrightHolder" : "{{ .Site.Params.name }}",
|
||||
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
||||
"datePublished": "{{ .Date }}",
|
||||
"dateModified" : "{{ .Date }}",
|
||||
"url" : "{{ .Permalink }}",
|
||||
"wordCount" : "{{ .WordCount }}",
|
||||
"keywords" : [{{ if isset .Params "keywords" }}{{ range .Params.keywords }}"{{ . }}", {{ end }}{{ end }}"Blog"]
|
||||
}
|
||||
{{ else }}
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Permalink }}",
|
||||
"name": "{{ .Title }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Params.name }}"
|
||||
},
|
||||
"description": "{{ if .IsHome }}{{ htmlEscape .Site.Params.description }}{{ else }}{{ htmlEscape .Description }}{{ end }}"
|
||||
}
|
||||
{{ end }}
|
||||
</script>
|
||||
Reference in New Issue
Block a user