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:
@@ -1285,6 +1285,11 @@ defmodule BerrypodWeb.PageEditorHook do
|
||||
handle_theme_action("remove_header", %{}, socket)
|
||||
end
|
||||
|
||||
defp handle_site_action("update_business_info", %{"business_info" => info_params}, socket) do
|
||||
socket = handle_business_info_update(socket, info_params)
|
||||
{:halt, socket}
|
||||
end
|
||||
|
||||
# Catch-all for unknown site actions
|
||||
defp handle_site_action(_action, _params, socket), do: {:halt, socket}
|
||||
|
||||
@@ -1334,6 +1339,20 @@ defmodule BerrypodWeb.PageEditorHook do
|
||||
|> assign(:site_dirty, SiteEditorState.dirty?(state))
|
||||
end
|
||||
|
||||
defp handle_business_info_update(socket, params) do
|
||||
state = socket.assigns.site_state
|
||||
|
||||
# Update each business info field
|
||||
state =
|
||||
Enum.reduce(params, state, fn {key, value}, acc ->
|
||||
SiteEditorState.put_business_info(acc, key, value)
|
||||
end)
|
||||
|
||||
socket
|
||||
|> assign(:site_state, state)
|
||||
|> assign(:site_dirty, SiteEditorState.dirty?(state))
|
||||
end
|
||||
|
||||
# Helper to update site state and compute dirty flag
|
||||
defp update_site_state(socket, update_fn) do
|
||||
state = socket.assigns.site_state
|
||||
|
||||
Reference in New Issue
Block a user