From 6cebeae654be09bdd30e802676d77525e2790613 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 5 Sep 2019 17:20:00 +0100 Subject: [PATCH] refactor: strip out Microdata for blog posts, pages, and pubs Forms part of the transition from Microdata to JSON-LD. See #413 --- layouts/_default/single.html | 4 ++-- layouts/partials/jsonld/article.html | 8 ++++---- layouts/partials/page_header.html | 8 ++++---- layouts/partials/page_metadata.html | 5 +---- layouts/publication/single.html | 4 ++-- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d2e483ff..45b9df9d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,12 +1,12 @@ {{- define "main" -}} -
+
{{ partial "page_header" . }}
-
+
{{ .Content }}
diff --git a/layouts/partials/jsonld/article.html b/layouts/partials/jsonld/article.html index 1c3b148e..f9a9220e 100644 --- a/layouts/partials/jsonld/article.html +++ b/layouts/partials/jsonld/article.html @@ -2,10 +2,10 @@ {{ $summary := .summary }} {{ $featured_image := ($page.Resources.ByType "image").GetMatch "*featured*" }} -{{/* Get microdata type. */}} -{{ $microdata_type := "Article" }} +{{/* Get schema type. */}} +{{ $schema := "Article" }} {{ if eq $page.Type "post" }} - {{ $microdata_type = "BlogPosting" }} + {{ $schema = "BlogPosting" }} {{ end }} {{/* Get author name. */}} @@ -25,7 +25,7 @@