add SEO enhancements: OG images, meta robots, FAQ block, image sitemap
All checks were successful
deploy / deploy (push) Successful in 4m59s
All checks were successful
deploy / deploy (push) Successful in 4m59s
- Per-page SEO controls: meta robots directives, focus keyword, OG image - Site-wide default OG image in admin settings - FAQ block type with FAQPage JSON-LD schema - Enhanced Organization JSON-LD with business info, contact, address - Image sitemap with product images - SEO preview panel with Google/social card mockups - SEO checklist with real-time scoring - Business info section in site editor - GSC integration scaffolding (OAuth, client, cache) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -801,6 +801,39 @@ defmodule BerrypodWeb.PageRenderer do
|
||||
"""
|
||||
end
|
||||
|
||||
defp render_block(%{block: %{"type" => "faq"}} = assigns) do
|
||||
settings = assigns.block["settings"] || %{}
|
||||
title = settings["title"] || ""
|
||||
|
||||
items =
|
||||
(settings["items"] || [])
|
||||
|> Enum.filter(fn item ->
|
||||
q = item["question"] || ""
|
||||
String.trim(q) != ""
|
||||
end)
|
||||
|
||||
assigns =
|
||||
assigns
|
||||
|> assign(:faq_title, title)
|
||||
|> assign(:items, items)
|
||||
|
||||
~H"""
|
||||
<section class="faq-section page-container">
|
||||
<h2 :if={@faq_title != ""} class="faq-title">{@faq_title}</h2>
|
||||
<dl class="faq-list">
|
||||
<details :for={item <- @items} class="faq-item">
|
||||
<summary class="faq-question">{item["question"]}</summary>
|
||||
<div class="faq-answer">
|
||||
<p :for={para <- String.split(item["answer"] || "", ~r/\n{2,}/, trim: true)}>
|
||||
{para}
|
||||
</p>
|
||||
</div>
|
||||
</details>
|
||||
</dl>
|
||||
</section>
|
||||
"""
|
||||
end
|
||||
|
||||
defp render_block(%{block: %{"type" => "trust_badges"}} = assigns) do
|
||||
~H"""
|
||||
<.trust_badges :if={@theme_settings.pdp_trust_badges} />
|
||||
|
||||
Reference in New Issue
Block a user