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:
50
lib/berrypod_web/components/seo_checklist.ex
Normal file
50
lib/berrypod_web/components/seo_checklist.ex
Normal file
@@ -0,0 +1,50 @@
|
||||
defmodule BerrypodWeb.Components.SeoChecklist do
|
||||
@moduledoc """
|
||||
SEO checklist component showing focus keyword analysis results.
|
||||
|
||||
Displays a score and list of checks with pass/fail/warning status.
|
||||
"""
|
||||
|
||||
use Phoenix.Component
|
||||
|
||||
import BerrypodWeb.CoreComponents, only: [icon: 1]
|
||||
|
||||
alias Berrypod.SEO.Analyser
|
||||
|
||||
@doc """
|
||||
Renders the SEO checklist with score and checks.
|
||||
"""
|
||||
attr :page, :map, required: true
|
||||
|
||||
def seo_checklist(assigns) do
|
||||
checks = Analyser.analyse(assigns.page)
|
||||
score = Analyser.score(checks)
|
||||
level = Analyser.score_level(score)
|
||||
|
||||
assigns =
|
||||
assigns
|
||||
|> assign(:checks, checks)
|
||||
|> assign(:score, score)
|
||||
|> assign(:level, level)
|
||||
|
||||
~H"""
|
||||
<div class="seo-checklist">
|
||||
<div class="seo-score" data-level={@level}>
|
||||
<span class="seo-score-value">{@score}%</span>
|
||||
<span class="seo-score-label">SEO score</span>
|
||||
</div>
|
||||
<ul class="seo-checks">
|
||||
<li :for={check <- @checks} class="seo-check" data-status={check.status}>
|
||||
<.icon name={status_icon(check.status)} class="size-4 seo-check-icon" />
|
||||
<span class="seo-check-label">{check.label}</span>
|
||||
<span class="seo-check-hint">{check.message}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
"""
|
||||
end
|
||||
|
||||
defp status_icon(:pass), do: "hero-check-circle"
|
||||
defp status_icon(:fail), do: "hero-x-circle"
|
||||
defp status_icon(:warning), do: "hero-exclamation-triangle"
|
||||
end
|
||||
Reference in New Issue
Block a user