msfjarvis.dev/themes/codex/layouts/partials/seo-schema.html
Harsh Shandilya 9f9fce4b9a Merge remote-tracking branch 'codex/master' into src
* codex/master: (137 commits)
  docs: update .all-contributorsrc [skip ci]
  docs: update README.md [skip ci]
  Fix nav display error when expanding window with open burger.
  fix icon sizes
  docs: update .all-contributorsrc [skip ci]
  docs: update README.md [skip ci]
  Conform icons to Google's mobile usability reqs
  fix relative icon issue + add title
  docs: Clean up README and config.toml (#65)
  update screenshot and add to README
  v1.5.0
  added resources folder back
  refactor: revert md/js files
  refactor: use semicolon in js
  refactor: ignore exampleSite/content dir
  change bottom padding of pages to 1rem
  update CONTRIBUTING.md
  add prettier
  v1.4.0
  fix script block
  ...

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-12 03:09:52 +05:30

43 lines
1.4 KiB
HTML

<!-- 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>