Skip to content

Commit

Permalink
Hugo seo schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hiensarahly committed Aug 6, 2019
1 parent f32f835 commit ffd306f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions layouts/partials/seo_schema.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Site.BaseURL }}"
},
"articleSection" : "{{ .Section }}",
"name" : "{{ .Title }}",
"headline" : "{{ .Title }}",
"description" : "{{ if .Description }}{{ .Description }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ end }}{{ end }}",
"inLanguage" : "en-US",
"author" : "{{ .Params.author }}",
"creator" : "{{ range .Params.author }}{{ . }}{{ end }}",
"publisher": "{{ range .Site.Author }}{{ . }}{{ end }}",
"accountablePerson" : "{{ range .Site.Author }}{{ . }}{{ end }}",
"copyrightHolder" : "{{ range .Site.Author }}{{ . }}{{ end }}",
"copyrightYear" : "{{ .Date.Format "2006" }}",
"datePublished": "{{ .Date }}",
"dateModified" : "{{ .Date }}",
"url" : "{{ .Permalink }}",
"wordCount" : "{{ .WordCount }}",
"keywords" : [ {{ if isset .Params "keywords" }}{{ range .Params.keywords }}"{{ . }}",{{ end }}{{ end }} ]
}
</script>

0 comments on commit ffd306f

Please sign in to comment.