feat: add seo_meta service for AI-generated SEO metadata with CLI management and database layer

Implement a new `SeoMetaService` subservice that generates clean SEO title/description/keywords for published content items, distinct from the existing SEO diagnostics auditor. Add `seo_metadata` polymorphic table with soft-delete support, batch query methods, and usage tracking. Extend the CLI with `seo-meta prune` and `seo-meta clear` commands for job row lifecycle management. Wire `schedule_seo_meta_for_table` into content creation and editing flows in `content.py`. Document the new service in `AGENTS.md` and `README.md`, including the `extra_head` site setting for custom `<head>` injection.
This commit is contained in:
2026-06-19 20:15:22 +00:00
parent 426d3639c6
commit d10f1af118
51 changed files with 2262 additions and 93 deletions
+2 -1
View File
@@ -124,7 +124,8 @@ async def news_detail_page(request: Request, news_slug: str):
seo_ctx = base_seo_context(
request,
title=article.get("title", "News Article"),
description=(article.get("description", "") or "")[:200],
description=article.get("description", "") or "",
seo_target=("news", article["uid"]),
og_type="article",
og_image=image_url or None,
breadcrumbs=[