From 185b52a338caecc802e751e9c54c58155f984f01 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 10:45:03 +0200 Subject: feat: add Breadcrumb JSON-LD structured data to single pages - New partial: breadcrumb-jsonld.html generates BreadcrumbList schema - Integrated into head-meta.html for single content pages only - i18n aware: Italian uses /it/ prefix, localized "Home"/"Articoli" - No JSON-LD on homepage or list pages (Kind="page" guard) - Valid JSON schema per https://schema.org/BreadcrumbList - Fixes TODO.md:30 Co-Authored-By: Claude Haiku 4.5 --- .../layouts/partials/breadcrumb-jsonld.html | 33 ++++++++++++++++++++++ .../layouts/partials/head-meta.html | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html diff --git a/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html b/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html new file mode 100644 index 0000000..3f873a0 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html @@ -0,0 +1,33 @@ +{{- $homeURL := absURL "/" -}} +{{- $articlesURL := absURL "/articles/" -}} +{{- $homeName := i18n "home" -}} +{{- $articlesName := i18n "articles" -}} +{{- if eq .Lang "it" -}} + {{- $homeURL = absURL "/it/" -}} + {{- $articlesURL = absURL "/it/articles/" -}} +{{- end -}} + diff --git a/themes/danix-xyz-hacker/layouts/partials/head-meta.html b/themes/danix-xyz-hacker/layouts/partials/head-meta.html index 45fd476..89b5d50 100644 --- a/themes/danix-xyz-hacker/layouts/partials/head-meta.html +++ b/themes/danix-xyz-hacker/layouts/partials/head-meta.html @@ -52,3 +52,6 @@ {{ end }} {{ end }} + +{{/* Structured data: BreadcrumbList JSON-LD (single content pages only) */}} +{{ if eq .Kind "page" }}{{ partial "breadcrumb-jsonld.html" . }}{{ end }} -- cgit v1.2.3