schema.html 954 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script type="application/ld+json">
  2. {{ if eq .Section "blog" }}
  3. {
  4. "@context": "https://schema.org",
  5. "@type": "BlogPosting",
  6. "headline": {{ .Title }},
  7. "image": {{ .Params.image | absURL }},
  8. "datePublished": {{ .PublishDate }},
  9. "dateModified": {{ .Lastmod }},
  10. "author": {
  11. "@type": "Person",
  12. "name": {{ .Site.Params.author }}
  13. },
  14. "mainEntityOfPage": { "@type": "WebPage" },
  15. "publisher": {
  16. "@type": "Organization",
  17. "name": {{ .Site.Params.author }},
  18. "logo": {
  19. "@type": "ImageObject",
  20. "url": {{ .Site.Params.logo }}
  21. }
  22. },
  23. "description": {{ .Summary | plainify | safeHTML }},
  24. "keywords": [{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}]
  25. }
  26. {{ end }}
  27. {
  28. "@context": "https://schema.org",
  29. "@type": "Organization",
  30. "name": {{ .Site.Params.author }},
  31. "url": {{ .Site.BaseURL }},
  32. "sameAs": [
  33. "https://www.facebook.com/{{ .Site.Params.facebook }}"
  34. ]
  35. }
  36. </script>