Highlights
sm-journal-plugin v0.6.0 replaces hardcoded YouTube-only embed handling with a generic, app-extensible embed provider registry, upgrades the Blog Editor with adaptive custom embed authoring and static fallback preservation, and adds MCP tools for reading and editing category pages.
Added
- Extensible embed provider registry (
classes.EmbedRegistry): Register custom embed providers via YAML (golem15.journal.embed_providers) or in Go (classes.EmbedRegistryFrom(app).Register(...)) alongside the built-inyoutubedefault, with fail-loud boot validation for invalid/reserved keys, uncompilable regexes, and unknown modes. - Pair-aware embed HTML sanitization: Validates
(data-embed, data-id)as a pair per provider acrossFormatHTML,SanitizeHTML,SanitizeHTMLReport,FormatTranslation, andCheckHTML, allowing validateddata-aspectanddata-heightCLS hints and UGC-sanitized static fallback children (<img>,<figcaption>). - Adaptive Blog Editor embeds:
blogRequestOptionsemits registeredembedProviders; the editor keeps the single YouTube URL input when onlyyoutubeis registered and adapts to a provider selector, ID input, Media Library fallback image picker, caption, and aspect/height hints when custom providers exist. The TipTapEmbednode and preview pane preserve fallback markup on round-trip. - Category API & MCP tools: Added
GET /_journal/api/v1/categories/{slug}(journal_show_category) andPUT /_journal/api/v1/categories/{id}(journal_update_category) with HTML sanitization, H1-to-H2 conversion notices, record events, and site cache purge.
Changed
- Wired
EmbedRegistryFrom(app)across Blog Editor load/decode/options, Journal API post writes, andjournal:import-postsso every write and load path honors app-scoped embed providers. - Scoped the Blog Editor preview
16/9image crop to YouTube thumbnail cards so custom fallback images keep their natural aspect ratio.
Fixed
- Rejected reserved keys (
constructor,prototype) in Go and Blog Editor embed provider registration for cross-layer parity. - Degraded custom embed providers without a URL parser to ID input mode and added dedicated English/Polish validation messages for invalid aspect ratio and height inputs.