Skip to content

Commit 9a1af10

Browse files
authored
Merge pull request #38 from szolkowski/feature/seo-tool-jsonld-and-slug-refinements
Another SEO refinements
2 parents da1f436 + b2d8db1 commit 9a1af10

27 files changed

Lines changed: 129 additions & 36 deletions

File tree

_includes/head-custom.html

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,23 @@
2020
{% endunless %}
2121

2222
{%- comment -%}
23-
Stable @id URIs cross-referenced from every page's @graph.
23+
Stable @id URIs cross-referenced from every page's @graph. The page_id suffix
24+
matches the page's primary @type so the graph reads naturally:
25+
post → #article, /about/ → #profilepage, /tags/ + tagpages → #collection,
26+
everything else → #webpage.
2427
{%- endcomment -%}
2528
{%- assign person_id = site.url | append: '/about/#stanislaw' -%}
2629
{%- assign website_id = site.url | append: '/#website' -%}
27-
{%- assign page_id = page.url | absolute_url | append: '#webpage' -%}
30+
{%- assign breadcrumb_id = page.url | absolute_url | append: '#breadcrumb' -%}
31+
{%- if page.layout == "post" -%}
32+
{%- assign page_id = page.url | absolute_url | append: '#article' -%}
33+
{%- elsif page.url == "/about/" -%}
34+
{%- assign page_id = page.url | absolute_url | append: '#profilepage' -%}
35+
{%- elsif page.url == "/tags/" or page.layout == "tagpage" -%}
36+
{%- assign page_id = page.url | absolute_url | append: '#collection' -%}
37+
{%- else -%}
38+
{%- assign page_id = page.url | absolute_url | append: '#webpage' -%}
39+
{%- endif -%}
2840

2941
<script type="application/ld+json">
3042
{
@@ -43,11 +55,19 @@
4355
"@type": "Person",
4456
"@id": "{{ person_id }}",
4557
"name": "Stanisław Szołkowski",
58+
"alternateName": "Stanislaw Szolkowski",
4659
"givenName": "Stanisław",
4760
"familyName": "Szołkowski",
4861
"knowsLanguage": ["en", "pl"],
4962
"url": "{{ '/about/' | absolute_url }}",
50-
"image": "{{ person_image | absolute_url }}",
63+
"image": {
64+
"@type": "ImageObject",
65+
"@id": "{{ site.url }}/about/#stanislaw-photo",
66+
"url": "{{ person_image | absolute_url }}",
67+
"width": 400,
68+
"height": 400,
69+
"caption": "Stanisław Szołkowski"
70+
},
5171
"jobTitle": "Principal .NET/Optimizely Engineer",
5272
"award": [
5373
"Optimizely MVP 2025",
@@ -102,17 +122,19 @@
102122
"@type": "ImageObject",
103123
"url": "{{ person_image | absolute_url }}"
104124
},
105-
"breadcrumb": { "@id": "{{ page.url | absolute_url }}#breadcrumb" }
125+
"breadcrumb": { "@id": "{{ breadcrumb_id }}" }
106126
},
107127
{
108128
"@type": "BreadcrumbList",
109-
"@id": "{{ page.url | absolute_url }}#breadcrumb",
129+
"@id": "{{ breadcrumb_id }}",
110130
"itemListElement": [
111131
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
112132
{"@type": "ListItem", "position": 2, "name": "About"}
113133
]
114134
}
115135
{%- elsif page.layout == "post" -%}
136+
{%- assign primary = page.primary_tag | default: page.tags.first -%}
137+
{%- assign primary_slug = primary | slugify -%}
116138
,
117139
{
118140
"@type": "BlogPosting",
@@ -126,21 +148,28 @@
126148
"author": { "@id": "{{ person_id }}" },
127149
"publisher": { "@id": "{{ person_id }}" },
128150
"isPartOf": { "@id": "{{ website_id }}" },
129-
"mainEntityOfPage": { "@id": "{{ page_id }}" }
151+
"mainEntityOfPage": { "@id": "{{ page_id }}" },
152+
"breadcrumb": { "@id": "{{ breadcrumb_id }}" },
153+
"keywords": {{ page.tags | join: ", " | jsonify }},
154+
"articleSection": {{ primary | jsonify }},
155+
"wordCount": {{ content | strip_html | number_of_words }}
130156
{%- if page.image -%}
131157
,
132158
"image": {
133159
"@type": "ImageObject",
134160
"url": "{{ page.image.path | absolute_url }}",
135-
"description": {{ page.image.alt | jsonify }}
161+
"width": {{ page.image.width | plus: 0 }},
162+
"height": {{ page.image.height | plus: 0 }},
163+
"caption": {{ page.image.alt | jsonify }}
136164
}
137165
{%- endif -%}
138166
},
139167
{
140168
"@type": "BreadcrumbList",
169+
"@id": "{{ breadcrumb_id }}",
141170
"itemListElement": [
142171
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
143-
{"@type": "ListItem", "position": 2, "name": "Archive", "item": "{{ '/archive/' | absolute_url }}"},
172+
{"@type": "ListItem", "position": 2, "name": {{ primary | jsonify }}, "item": "{{ '/tags/' | append: primary_slug | absolute_url }}"},
144173
{"@type": "ListItem", "position": 3, "name": {{ page.title | jsonify }}, "item": "{{ page.url | absolute_url }}"}
145174
]
146175
}
@@ -154,6 +183,7 @@
154183
"description": {{ page.description | jsonify }},
155184
"inLanguage": "en-US",
156185
"isPartOf": { "@id": "{{ website_id }}" },
186+
"breadcrumb": { "@id": "{{ breadcrumb_id }}" },
157187
"mainEntity": {
158188
"@type": "ItemList",
159189
"numberOfItems": {{ site.tags | size }},
@@ -169,6 +199,7 @@
169199
},
170200
{
171201
"@type": "BreadcrumbList",
202+
"@id": "{{ breadcrumb_id }}",
172203
"itemListElement": [
173204
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
174205
{"@type": "ListItem", "position": 2, "name": "Tags", "item": "{{ '/tags/' | absolute_url }}"}
@@ -182,10 +213,12 @@
182213
"url": "{{ page.url | absolute_url }}",
183214
"name": {{ page.title | jsonify }},
184215
"inLanguage": "en-US",
185-
"isPartOf": { "@id": "{{ website_id }}" }
216+
"isPartOf": { "@id": "{{ website_id }}" },
217+
"breadcrumb": { "@id": "{{ breadcrumb_id }}" }
186218
},
187219
{
188220
"@type": "BreadcrumbList",
221+
"@id": "{{ breadcrumb_id }}",
189222
"itemListElement": [
190223
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
191224
{"@type": "ListItem", "position": 2, "name": "Tags", "item": "{{ '/tags/' | absolute_url }}"},
@@ -201,11 +234,11 @@
201234
"name": {{ page.title | jsonify }},
202235
"inLanguage": "en-US",
203236
"isPartOf": { "@id": "{{ website_id }}" },
204-
"breadcrumb": { "@id": "{{ page.url | absolute_url }}#breadcrumb" }
237+
"breadcrumb": { "@id": "{{ breadcrumb_id }}" }
205238
},
206239
{
207240
"@type": "BreadcrumbList",
208-
"@id": "{{ page.url | absolute_url }}#breadcrumb",
241+
"@id": "{{ breadcrumb_id }}",
209242
"itemListElement": [
210243
{"@type": "ListItem", "position": 1, "name": "Home", "item": "{{ '/' | absolute_url }}"},
211244
{"@type": "ListItem", "position": 2, "name": "Archive"}

_posts/2022-07-28-episerver-on-apple-silicon.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ published: true
99
image:
1010
path: assets/img/2022-07-28-episerver-on-apple-silicon-episerver-running-on-m1-1.png
1111
alt: "Optimizely Foundation site running in the CMS Edit view on an Apple Silicon (M1) Mac, showing the Mosey demo home page"
12+
width: 2874
13+
height: 1590
14+
primary_tag: apple silicon
1215
tags:
1316
- episerver
1417
- optimizely

_posts/2022-07-30-add-github-pipeline-to-epi-12.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ author: Stanisław Szołkowski
77
comments: true
88
published: true
99
redirect_from: /2022/08/15/add-sonarcloud-to-epi-12-pipeline.html
10+
primary_tag: devops
1011
tags:
1112
- episerver
1213
- optimizely

_posts/2023-08-15-add-sonarcloud-to-epi-12-pipeline.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ published: true
99
image:
1010
path: assets/img/2023-08-15-add-sonarcloud-to-epi-12-pipeline-ogimage.png
1111
alt: Add SonarCloud/SonarQube to Episerver/Optimizely 12 project title image
12+
width: 1280
13+
height: 720
14+
primary_tag: sonarcloud
1215
tags:
1316
- episerver
1417
- optimizely

_posts/2024-07-31-adding-hangfire-to-epi-12.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ redirect_from: /2024/07/11/adding-hangfire-to-epi-12.html
1010
image:
1111
path: assets/img/2024-07-31-hangfire-cms-overview.png
1212
alt: Integrated Hangfire dashboard with Optimizely CMS back office
13+
width: 2172
14+
height: 1458
15+
primary_tag: hangfire
1316
tags:
1417
- episerver
1518
- optimizely

_posts/2025-05-26-episerver-on-apple-silicon-2025.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ published: true
99
image:
1010
path: assets/img/2025-05-26-cms-home-page.png
1111
alt: "Running full Optimizely development setup on M1 (ARM) based machine"
12+
width: 2153
13+
height: 1192
14+
primary_tag: apple silicon
1215
tags:
1316
- episerver
1417
- optimizely

_posts/2025-06-12-episerver-and-application-insights-filters.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ published: true
99
image:
1010
path: assets/img/2025-06-12-application-insights-data-digestion-size.png
1111
alt: "Tunning Application Insights telemetry filtering in Optimizely"
12+
width: 2423
13+
height: 888
14+
primary_tag: application insights
1215
redirect_from:
1316
- /2025/06/12/episerver-and_application_insights_filters.html
1417
- /2025/06/12/episerver-and_application_insights_filters

_posts/2025-09-04-automatically-removing-orphaned-jobs-from-db.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ published: true
99
image:
1010
path: assets/img/2025-06-12-optimizely-scheduled-jobs-dashboard.png
1111
alt: "How to automatically remove orphaned Opti jobs from the DB"
12+
width: 1221
13+
height: 372
14+
primary_tag: scheduled jobs
1215
tags:
1316
- episerver
1417
- optimizely

_posts/2025-10-08-Quiet-Performance-Wins-Scheduled-Job-for-SQL-Index-Maintenance-in-Optimizely.md renamed to _posts/2025-10-08-quiet-performance-wins-scheduled-job-for-sql-index-maintenance-in-optimizely.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ date: 2025-10-08 10:00:00 +0200
66
author: Stanisław Szołkowski
77
comments: true
88
published: true
9+
redirect_from:
10+
- /2025/10/08/Quiet-Performance-Wins-Scheduled-Job-for-SQL-Index-Maintenance-in-Optimizely.html
911
image:
10-
path: assets/img/2025-10-08-Quiet-Performance-Wins-Scheduled-Job-for-SQL-Index-Maintenance-in-Optimizely.jpeg
12+
path: assets/img/2025-10-08-quiet-performance-wins-scheduled-job-for-sql-index-maintenance-in-optimizely.jpeg
1113
alt: "Quiet Performance Wins: Scheduled Job for SQL Index Maintenance in Optimizely"
14+
width: 1024
15+
height: 628
16+
primary_tag: performance
1217
tags:
1318
- episerver
1419
- optimizely

_posts/2026-02-18-Memory-Efficient-Catalog-Traversal-in-Optimizely-Commerce-Part-1-Building-the-Service.md renamed to _posts/2026-02-18-memory-efficient-catalog-traversal-in-optimizely-commerce-part-1-building-the-service.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ date: 2026-02-18 10:00:00 +0200
66
author: Stanisław Szołkowski
77
comments: true
88
published: true
9-
redirect_from: /2026/01/18/Memory-Efficient-Catalog-Traversal-in-Optimizely-Commerce-Part-1-Building-the-Service.html
9+
redirect_from:
10+
- /2026/01/18/Memory-Efficient-Catalog-Traversal-in-Optimizely-Commerce-Part-1-Building-the-Service.html
11+
- /2026/02/18/Memory-Efficient-Catalog-Traversal-in-Optimizely-Commerce-Part-1-Building-the-Service.html
1012
image:
11-
path: assets/img/2026-02-18-Memory-Efficient-Catalog-Traversal-in-Optimizely-Commerce-Part-1-Building-the-Service.png
13+
path: assets/img/2026-02-18-memory-efficient-catalog-traversal-in-optimizely-commerce-part-1-building-the-service.png
1214
alt: "Memory-Efficient Catalog Traversal in Optimizely Commerce. Part 1: Building the Service"
15+
width: 1200
16+
height: 630
17+
primary_tag: commerce
1318
tags:
1419
- episerver
1520
- optimizely
@@ -267,5 +272,5 @@ Thank you for reading, and stay tuned for Part 2 where we put this service to wo
267272
## This Post is Part of a Series
268273

269274
- Part 1: Building the Service - (this post)
270-
- [Part 2: Real-World Scheduled Job Patterns]({% post_url 2026-02-24-Catalog-Traversal-in-Action-Part-2-Real-World-Scheduled-Job-Patterns %})
271-
- [Part 3: Hangfire Integration]({% post_url 2026-03-03-Catalog-Traversal-with-Hangfire-Part-3-Advanced-Job-Management %})
275+
- [Part 2: Real-World Scheduled Job Patterns]({% post_url 2026-02-24-catalog-traversal-in-action-part-2-real-world-scheduled-job-patterns %})
276+
- [Part 3: Hangfire Integration]({% post_url 2026-03-03-catalog-traversal-with-hangfire-part-3-advanced-job-management %})

0 commit comments

Comments
 (0)