add JSON-LD structured data

Product pages: Product schema (name, description, image, price/currency,
availability) + BreadcrumbList (Home > Category > Product). Home page:
Organization schema (name, url). Uses Jason with html_safe escaping so
the JSON is safe to embed in <script> tags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-23 22:37:34 +00:00
parent 0f1135256d
commit 4e36b654d3
4 changed files with 94 additions and 4 deletions

View File

@@ -40,6 +40,11 @@
<% end %>
<meta name="twitter:title" content={og_title} />
<meta name="twitter:description" content={og_description} />
<%= if assigns[:json_ld] do %>
<script type="application/ld+json">
<%= Phoenix.HTML.raw(assigns[:json_ld]) %>
</script>
<% end %>
<!-- Preload critical fonts for the current typography preset -->
<%= for preload <- Berrypod.Theme.Fonts.preload_links(
@theme_settings.typography,