Original post: Breadcrumb navigation with Schema.org markup
Series: Part of How this blog was built — documenting every decision that shaped this site.
Breadcrumbs are one of those components that look simple but have several layers
of correctness: the visual trail, the accessible markup, and the structured data
for search engines. All three matter and only one of them is visible to users.
Breadcrumb.astro handles all three, and it does so with a fallback auto-generation
system that derives the crumb list from the URL path when no explicit list is provided.
Diagram fallback for Dev.to. View the canonical article for the original SVG: https://sourcier.uk/blog/breadcrumb-schema-astro
The component interface
interface Crumb { label : string ; href ?: string ; }
interface Props { crumbs : Crumb []; inverted ?: boolean ; noContainer ?: boolean ; }
Enter fullscreen mode
Exit fullscreen mode
crumbs is an array of label/href pairs.…