Skip to content

Commit 5869bd6

Browse files
committed
Improve Rich Data
1 parent 5914e6a commit 5869bd6

File tree

2 files changed

+102
-2
lines changed

2 files changed

+102
-2
lines changed

archive.html

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
{% assign random = site.time | date: "%s%N" | modulo: site.posts.size %}
1212

13-
<p>I have written <b>{{ site.posts | size }}</b> post on this site, mostly
13+
<p>I have written <b>{{ site.posts | size }}</b> posts on this site, mostly
1414
covering web performance and CSS architecture. Find a reverse-chronological list
1515
of them below, or, at random, why not read
1616
<a href="{{ site.posts[random].url }}"><cite>{{ site.posts[random].title }}</cite></a>
@@ -33,6 +33,56 @@ <h2 id=year-{{ currentDate }}>{{ currentDate }}</h2>
3333
{% if forloop.last %}</ol>{% endif %}
3434
{% endfor %}
3535

36+
<script type="application/ld+json">
37+
{
38+
"@context": "https://schema.org",
39+
"@graph": [{
40+
"@type": "CollectionPage",
41+
"@id": "https://csswizardry.com/blog/#webpage",
42+
"url": "https://csswizardry.com/blog/",
43+
"name": "CSS Wizardry Blog Archives",
44+
"description": "Archive of CSS Wizardry articles covering web performance and CSS architecture.",
45+
"isPartOf": {
46+
"@type": "WebSite",
47+
"@id": "https://csswizardry.com/#website",
48+
"url": "https://csswizardry.com/",
49+
"name": "CSS Wizardry"
50+
},
51+
"about": [
52+
{
53+
"@type": "Organization",
54+
"@id": "https://csswizardry.com/#org",
55+
"name": "CSS Wizardry Ltd",
56+
"url": "https://csswizardry.com/"
57+
},
58+
{
59+
"@type": "Person",
60+
"@id": "https://csswizardry.com/#person",
61+
"name": "Harry Roberts",
62+
"url": "https://csswizardry.com/about/"
63+
}
64+
],
65+
"mainEntity": {
66+
"@type": "ItemList",
67+
"@id": "https://csswizardry.com/blog/#posts",
68+
"name": "Archived articles",
69+
"numberOfItems": {{ site.posts | size }},
70+
"itemListOrder": "https://schema.org/ItemListOrderDescending",
71+
"itemListElement": [
72+
{% for post in site.posts %}
73+
{
74+
"@type": "ListItem",
75+
"position": {{ forloop.index }},
76+
"url": "https://csswizardry.com{{ post.url }}",
77+
"name": {{ post.title | jsonify }}
78+
}{% unless forloop.last %},{% endunless %}
79+
{% endfor %}
80+
]
81+
}
82+
}]
83+
}
84+
</script>
85+
3686
<script type="application/ld+json">
3787
{
3888
"@context": "https://schema.org",

blog.html

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
{% assign random = site.time | date: "%s%N" | modulo: site.posts.size %}
1111

12-
<p>I have written <b>{{ site.posts | size }}</b> post on this site, mostly
12+
<p>I have written <b>{{ site.posts | size }}</b> posts on this site, mostly
1313
covering web performance and CSS architecture. Find a reverse-chronological list
1414
of them below, or, at random, why not read
1515
<a href="{{ site.posts[random].url }}"><cite>{{ site.posts[random].title }}</cite></a>
@@ -32,6 +32,56 @@ <h2 id=year-{{ currentDate }}>{{ currentDate }}</h2>
3232
{% if forloop.last %}</ol>{% endif %}
3333
{% endfor %}
3434

35+
<script type="application/ld+json">
36+
{
37+
"@context": "https://schema.org",
38+
"@graph": [{
39+
"@type": "CollectionPage",
40+
"@id": "https://csswizardry.com/blog/#webpage",
41+
"url": "https://csswizardry.com/blog/",
42+
"name": "CSS Wizardry Blog Archives",
43+
"description": "Archive of CSS Wizardry articles covering web performance and CSS architecture.",
44+
"isPartOf": {
45+
"@type": "WebSite",
46+
"@id": "https://csswizardry.com/#website",
47+
"url": "https://csswizardry.com/",
48+
"name": "CSS Wizardry"
49+
},
50+
"about": [
51+
{
52+
"@type": "Organization",
53+
"@id": "https://csswizardry.com/#org",
54+
"name": "CSS Wizardry Ltd",
55+
"url": "https://csswizardry.com/"
56+
},
57+
{
58+
"@type": "Person",
59+
"@id": "https://csswizardry.com/#person",
60+
"name": "Harry Roberts",
61+
"url": "https://csswizardry.com/about/"
62+
}
63+
],
64+
"mainEntity": {
65+
"@type": "ItemList",
66+
"@id": "https://csswizardry.com/blog/#posts",
67+
"name": "Archived articles",
68+
"numberOfItems": {{ site.posts | size }},
69+
"itemListOrder": "https://schema.org/ItemListOrderDescending",
70+
"itemListElement": [
71+
{% for post in site.posts %}
72+
{
73+
"@type": "ListItem",
74+
"position": {{ forloop.index }},
75+
"url": "https://csswizardry.com{{ post.url }}",
76+
"name": {{ post.title | jsonify }}
77+
}{% unless forloop.last %},{% endunless %}
78+
{% endfor %}
79+
]
80+
}
81+
}]
82+
}
83+
</script>
84+
3585
<script type="application/ld+json">
3686
{
3787
"@context": "https://schema.org",

0 commit comments

Comments
 (0)