← All plugin changes

sm-journal-plugin 0.6.0

v0.6.02 min readPlugins

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-in youtube default, 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 across FormatHTML, SanitizeHTML, SanitizeHTMLReport, FormatTranslation, and CheckHTML, allowing validated data-aspect and data-height CLS hints and UGC-sanitized static fallback children (<img>, <figcaption>).
  • Adaptive Blog Editor embeds: blogRequestOptions emits registered embedProviders; the editor keeps the single YouTube URL input when only youtube is registered and adapts to a provider selector, ID input, Media Library fallback image picker, caption, and aspect/height hints when custom providers exist. The TipTap Embed node and preview pane preserve fallback markup on round-trip.
  • Category API & MCP tools: Added GET /_journal/api/v1/categories/{slug} (journal_show_category) and PUT /_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, and journal:import-posts so every write and load path honors app-scoped embed providers.
  • Scoped the Blog Editor preview 16/9 image 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.
Subscribe via RSS