diff options
Diffstat (limited to 'layouts/partials/schema.org')
| -rw-r--r-- | layouts/partials/schema.org/article.html | 18 | ||||
| -rw-r--r-- | layouts/partials/schema.org/website.html | 2 |
2 files changed, 9 insertions, 11 deletions
diff --git a/layouts/partials/schema.org/article.html b/layouts/partials/schema.org/article.html index 821a1c8..05c8358 100644 --- a/layouts/partials/schema.org/article.html +++ b/layouts/partials/schema.org/article.html @@ -1,14 +1,14 @@ {{- /* Get schema type. */}} -{{ $schemaType := "Article" }} -{{ if or (eq .Type "post") (eq .Type "posts") }} - {{ $schemaType = "BlogPosting" }} -{{ end -}} +{{- $schemaType := "Article" -}} +{{- if or (eq .Type "post") (eq .Type "posts") -}} + {{- $schemaType = "BlogPosting" -}} +{{- end -}} -{{- $publisher := site.Params.seo.publisher | default site.Title }} -{{ $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png") }} -{{ $logo = $logo.Resize "96x96" -}} +{{- $publisher := site.Params.seo.publisher | default site.Title -}} +{{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png") -}} +{{- $logo = $logo.Resize "96x96" }} -<script type="application/ld+json"> +<script type="application/ld+json" id="schema-data"> { "@context": "https://schema.org", "@type": {{ $schemaType }}, @@ -62,5 +62,3 @@ "description": {{ partial "description.html" . }} } </script> - - diff --git a/layouts/partials/schema.org/website.html b/layouts/partials/schema.org/website.html index a84d110..c06bd76 100644 --- a/layouts/partials/schema.org/website.html +++ b/layouts/partials/schema.org/website.html @@ -1,4 +1,4 @@ -<script type="application/ld+json"> +<script type="application/ld+json" id="schema-data"> { "@context": "https://schema.org", "@type": "WebSite", |
