article.html 1.1 KB

12345678910111213141516171819202122232425262728
  1. <script type="application/ld+json">
  2. {
  3. "@context": "http://schema.org",
  4. "@type": "Article",
  5. "author": {
  6. "name" : "{{ if .Params.author -}}{{ .Params.author }}{{- else if .Site.Params.author.name -}}{{ .Site.Params.author.name }}{{- end }}"
  7. },
  8. "headline": "{{ .Title }}",
  9. "description" : "{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}",
  10. "inLanguage" : "{{ .Lang }}",
  11. "wordCount": {{ .WordCount }},
  12. "datePublished" : "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }}",
  13. "dateModified" : "{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}",
  14. "image" : "{{ .Site.Params.logo | absURL }}",
  15. "keywords" : [ "{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}" ],
  16. "mainEntityOfPage" : "{{ .Permalink }}",
  17. "publisher" : {
  18. "@type": "Organization",
  19. "name" : "{{ .Site.BaseURL }}",
  20. "logo" : {
  21. "@type" : "ImageObject",
  22. "url" : "{{ .Site.Params.logo | absURL }}",
  23. "height" : 60 ,
  24. "width" : 60
  25. }
  26. }
  27. }
  28. </script>