Skip to content

Commit 0129b9d

Browse files
committed
Improve Rich Data
1 parent baef136 commit 0129b9d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

_layouts/post.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
<script>performance.mark('contentStart')</script>
1717

1818
<p class=post__date>
19-
<time datetime={{ page.date | date: "%Y-%m-%d" }} itemprop=datePublished>{{ page.date | date: "%-d %B, %Y" }}</time>
19+
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop=datePublished>{{ page.date | date: "%-d %B, %Y" }}</time>
2020

2121
{% if page.last_modified_at %}
22-
<ins>(last updated on <time datetime={{ page.last_modified_at | date: "%Y-%m-%d" }} itemprop=dateModified>{{ page.last_modified_at | date: "%-d %B, %Y" }}</time>)</ins>
22+
<ins>(last updated on <time datetime="{{ page.last_modified_at | date_to_xmlschema }}" itemprop=dateModified>{{ page.last_modified_at | date: "%-d %B, %Y" }}</time>)</ins>
2323
{% endif %}
2424

2525
</p>
@@ -81,11 +81,13 @@ <h1 itemprop="name headline" elementtiming=page-title style="view-transition-na
8181
"headline": "{{ page.title }}",
8282
"keywords": "{{ page.tags | join: ',' }}",
8383
"description": "{{ page.meta }}",
84-
"datePublished": "{{ page.date }}",
85-
"dateModified": "{{ page.last_modified_at | default: page.date }}",
84+
"datePublished": "{{ page.date | date_to_xmlschema }}",
85+
"dateModified": "{{ page.last_modified_at | default: page.date | date_to_xmlschema }}",
86+
"inLanguage": "en-GB",
87+
"isAccessibleForFree": true,
8688
"author": {
8789
"@type": "Person",
88-
"url": "{{ site.url }}",
90+
"url": "{{ site.url }}/about/",
8991
"name": "Harry Roberts"
9092
},
9193
"publisher": {
@@ -124,11 +126,6 @@ <h1 itemprop="name headline" elementtiming=page-title style="view-transition-na
124126
}, {
125127
"@type": "ListItem",
126128
"position": 2,
127-
"name": "{{ page.date | date: "%Y" }}",
128-
"item": "https://csswizardry.com/blog/#year-{{ page.date | date: "%Y" }}"
129-
}, {
130-
"@type": "ListItem",
131-
"position": 3,
132129
"name": "{{ page.title }}",
133130
"item": "{{ site.url }}{{ page.url }}"
134131
}]

0 commit comments

Comments
 (0)