From caabb8c399408b5e01dc3984d7183b1e748ce5e1 Mon Sep 17 00:00:00 2001 From: Eloi Perdereau <eloi@perdereau.eu> Date: Wed, 4 Dec 2019 21:28:08 +0100 Subject: [PATCH] layouts fix: use date_to_xmlschema in schema.org's itemprop --- _layouts/single.html | 4 ++-- _layouts/splash.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_layouts/single.html b/_layouts/single.html index acf2110..05f2477 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -24,8 +24,8 @@ layout: default <article class="page" itemscope itemtype="https://schema.org/CreativeWork"> {% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} {% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} - {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: "%B %d, %Y" }}">{% endif %} - {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% endif %} + {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: date_to_xmlschema }}">{% endif %} + {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: date_to_xmlschema }}">{% endif %} <div class="page__inner-wrap"> {% unless page.header.type == 'overlay' or page.header.type == 'default' %} diff --git a/_layouts/splash.html b/_layouts/splash.html index 0fffbcd..b1f2ac0 100644 --- a/_layouts/splash.html +++ b/_layouts/splash.html @@ -12,8 +12,8 @@ layout: default <article class="splash" itemscope itemtype="https://schema.org/CreativeWork"> {% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} {% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %} - {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: "%B %d, %Y" }}">{% endif %} - {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% endif %} + {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date: date_to_xmlschema %d, %Y" }}">{% endif %} + {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: date_to_xmlschema %d, %Y" }}">{% endif %} <section class="page__content" itemprop="text"> {{ content }} -- GitLab