BlogPostingStructuredData
Purpose#
BlogPostingStructuredData emits Schema.org JSON-LD (BlogPosting) for a blog article page, so search engines can produce article rich results.Where it's rendered#
Rendered from Components/SingleBlog/Default.liquid:{% render 'Reusables\BlogPostingStructuredData\Default', blog: blog, canonicalUrl: canonicalUrl, organizationName: organizationName, organizationLogo: organizationLogo %}
The blog post object for the current article page.
Canonical URL used for url / mainEntityOfPage.
Publisher/author organization name.
Publisher logo URL (used in publisher.logo).
Model shape (storefront example)#
{
"title": "Sample blog title",
"content": "<p>Sample content</p>",
"mediaItem": { "link": "https://example.com/sample.jpg" },
"publishedAt": "2026-01-01T00:00:00Z",
"categoryName": "Sample category",
"tags": ["sample-tag"]
}
Template behavior (Liquid + Alpine)#
Renders nothing unless blog and blog.title are present.
Strips HTML from blog.content (via | strip_html | serialize) before emitting it as articleBody.
Conditionally includes image, datePublished/dateModified, articleSection, and keywords only when the corresponding source field is present.
Emits author/publisher (both Organization) only when organizationName is provided; publisher.logo is added only when organizationLogo is also provided.
Data contract (JS runtime)#
No client-side runtime state; all data is read directly from the Liquid render parameters at render time.JavaScript#
File: Reusables/BlogPostingStructuredData/Default.js
Exposes: blogpostingstructureddatareusabledefault (currently an empty object)The JSON-LD block is fully server-rendered; the global only reserves a unique name in the concatenated componentscripts.js bundle.Global Alpine stores#
None. This reusable does not read or update any Alpine store.Services / API calls#
None. All data (blog content/metadata) is passed in as render parameters; there are no client-side API calls.Dependencies#
Liquid: Reusables/BlogPostingStructuredData/Default.liquid
JS: Reusables/BlogPostingStructuredData/Default.js
Translations: Reusables/BlogPostingStructuredData/Default.json
Notes#
dateModified currently mirrors datePublished; if the platform starts tracking a real last-modified timestamp, update this to use it instead.
Modified at 2026-07-24 07:43:42