Skip to content

Commit 2330648

Browse files
authored
Merge pull request #36 from szolkowski/feature/enrich-jsonld-person-and-profilepage
Enhance JSON-LD structure for Person and ProfilePage with additional …
2 parents 17b858a + 9d90da7 commit 2330648

4 files changed

Lines changed: 60 additions & 3 deletions

File tree

_includes/head-custom.html

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,16 @@
4343
"@type": "Person",
4444
"@id": "{{ person_id }}",
4545
"name": "Stanisław Szołkowski",
46+
"givenName": "Stanisław",
47+
"familyName": "Szołkowski",
48+
"knowsLanguage": ["en", "pl"],
4649
"url": "{{ '/about/' | absolute_url }}",
4750
"image": "{{ person_image | absolute_url }}",
4851
"jobTitle": "Principal .NET/Optimizely Engineer",
49-
"award": "Optimizely MVP",
52+
"award": [
53+
"Optimizely MVP 2025",
54+
"Optimizely MVP 2026"
55+
],
5056
"description": "Optimizely MVP and .NET engineer writing about Optimizely (Episerver) CMS / Commerce, Hangfire, scheduled jobs, and SQL Server performance.",
5157
"knowsAbout": [
5258
"Optimizely CMS",
@@ -74,6 +80,7 @@
7480
"@id": "{{ page_id }}",
7581
"url": "{{ page.url | absolute_url }}",
7682
"name": {{ page.title | jsonify }},
83+
"inLanguage": "en-US",
7784
"isPartOf": { "@id": "{{ website_id }}" },
7885
"about": { "@id": "{{ person_id }}" },
7986
"primaryImageOfPage": "{{ '/assets/img/og-default.png' | absolute_url }}"
@@ -86,8 +93,24 @@
8693
"url": "{{ page.url | absolute_url }}",
8794
"name": "About Stanisław Szołkowski",
8895
"description": {{ page.description | jsonify }},
96+
"inLanguage": "en-US",
97+
"dateCreated": "2022-07-28",
98+
"dateModified": "{{ page.last_modified_at | default: site.time | date_to_xmlschema }}",
8999
"isPartOf": { "@id": "{{ website_id }}" },
90-
"mainEntity": { "@id": "{{ person_id }}" }
100+
"mainEntity": { "@id": "{{ person_id }}" },
101+
"primaryImageOfPage": {
102+
"@type": "ImageObject",
103+
"url": "{{ person_image | absolute_url }}"
104+
},
105+
"breadcrumb": { "@id": "{{ page.url | absolute_url }}#breadcrumb" }
106+
},
107+
{
108+
"@type": "BreadcrumbList",
109+
"@id": "{{ page.url | absolute_url }}#breadcrumb",
110+
"itemListElement": [
111+
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
112+
{"@type": "ListItem", "position": 2, "name": "About"}
113+
]
91114
}
92115
{%- elsif page.layout == "post" -%}
93116
,
@@ -97,6 +120,7 @@
97120
"url": "{{ page.url | absolute_url }}",
98121
"headline": {{ page.title | jsonify }},
99122
"description": {{ page.description | jsonify }},
123+
"inLanguage": "en-US",
100124
"datePublished": "{{ page.date | date_to_xmlschema }}",
101125
"dateModified": "{{ page.last_modified_at | default: page.date | date_to_xmlschema }}",
102126
"author": { "@id": "{{ person_id }}" },
@@ -128,6 +152,7 @@
128152
"url": "{{ page.url | absolute_url }}",
129153
"name": "All topics — Szołkowski's Blog",
130154
"description": {{ page.description | jsonify }},
155+
"inLanguage": "en-US",
131156
"isPartOf": { "@id": "{{ website_id }}" },
132157
"mainEntity": {
133158
"@type": "ItemList",
@@ -156,6 +181,7 @@
156181
"@id": "{{ page_id }}",
157182
"url": "{{ page.url | absolute_url }}",
158183
"name": {{ page.title | jsonify }},
184+
"inLanguage": "en-US",
159185
"isPartOf": { "@id": "{{ website_id }}" }
160186
},
161187
{
@@ -166,13 +192,33 @@
166192
{"@type": "ListItem", "position": 3, "name": {{ page.tag | jsonify }}, "item": "{{ page.url | absolute_url }}"}
167193
]
168194
}
195+
{%- elsif page.url == "/archive/" -%}
196+
,
197+
{
198+
"@type": "WebPage",
199+
"@id": "{{ page_id }}",
200+
"url": "{{ page.url | absolute_url }}",
201+
"name": {{ page.title | jsonify }},
202+
"inLanguage": "en-US",
203+
"isPartOf": { "@id": "{{ website_id }}" },
204+
"breadcrumb": { "@id": "{{ page.url | absolute_url }}#breadcrumb" }
205+
},
206+
{
207+
"@type": "BreadcrumbList",
208+
"@id": "{{ page.url | absolute_url }}#breadcrumb",
209+
"itemListElement": [
210+
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
211+
{"@type": "ListItem", "position": 2, "name": "Archive"}
212+
]
213+
}
169214
{%- else -%}
170215
,
171216
{
172217
"@type": "WebPage",
173218
"@id": "{{ page_id }}",
174219
"url": "{{ page.url | absolute_url }}",
175220
"name": {{ page.title | jsonify }},
221+
"inLanguage": "en-US",
176222
"isPartOf": { "@id": "{{ website_id }}" }
177223
}
178224
{%- endif -%}

tests/__snapshots__/about.spec.ts/jsonld-person.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22
"@type": "Person",
33
"@id": "https://szolkowski.github.io/about/#stanislaw",
44
"name": "Stanisław Szołkowski",
5+
"givenName": "Stanisław",
6+
"familyName": "Szołkowski",
7+
"knowsLanguage": [
8+
"en",
9+
"pl"
10+
],
511
"url": "https://szolkowski.github.io/about/",
612
"image": "https://szolkowski.github.io/assets/img/stanislaw-szolkowski.jpg",
713
"jobTitle": "Principal .NET/Optimizely Engineer",
8-
"award": "Optimizely MVP",
14+
"award": [
15+
"Optimizely MVP 2025",
16+
"Optimizely MVP 2026"
17+
],
918
"description": "Optimizely MVP and .NET engineer writing about Optimizely (Episerver) CMS / Commerce, Hangfire, scheduled jobs, and SQL Server performance.",
1019
"knowsAbout": [
1120
"Optimizely CMS",

tests/__snapshots__/about.spec.ts/structure.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"https://world.optimizely.com/System/Users-and-profiles/Community-Profile-Card/?userId=7329f76b-c577-49d5-aa09-c8aff3c0610d"
3131
],
3232
"jsonLdTypes": [
33+
"BreadcrumbList",
3334
"Person",
3435
"ProfilePage",
3536
"WebSite"

tests/__snapshots__/archive.spec.ts/structure.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"https://world.optimizely.com/System/Users-and-profiles/Community-Profile-Card/?userId=7329f76b-c577-49d5-aa09-c8aff3c0610d"
3131
],
3232
"jsonLdTypes": [
33+
"BreadcrumbList",
3334
"Person",
3435
"WebPage",
3536
"WebSite"

0 commit comments

Comments
 (0)