Skip to content

Releases: k11k-labs/better-blocks-astro-renderer

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 21 Jun 13:23
7829fb4

Minor Changes

  • #22 02fd553 Thanks @kkukielka! - Fix cross-origin file downloads and add a filePreview toggle for file buttons.

    File-mode download buttons are now tagged data-bb-download and force a real download via a small scoped progressive-enhancement script (a blob fetch saved from a same-origin object URL). The native download attribute is ignored for cross-origin assets (Strapi/CDN), which made PDFs, videos and images preview inline instead of saving. Without JavaScript the anchor still works via its href + download attributes, and a CORS-blocked fetch falls back to native navigation.

    Adds the filePreview option (mirrors the editor field): when true, the file opens in a new tab (target="_blank" rel="noopener noreferrer", no download) for preview instead of downloading — this path stays fully zero-JS. filePreview is also passed through to custom button renderers.

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 20 Jun 22:33
e82a893

Minor Changes

  • #18 6b5acfb Thanks @kkukielka! - Add support for the button block (WordPress-style CTA + Media Library file download). Link mode renders an <a> with href/target/rel/aria-label; file mode renders a download link with an optional file-type icon (showFileIcon) and human-readable size (showFileSize). The style object is applied as inline CSS, alignment controls a block-level wrapper, and hover colors are exposed as --bb-button-hover-* custom properties wired up by a scoped stylesheet (hover transition + keyboard focus ring, zero client-side JavaScript). The block is overridable through the blocks.button prop.

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 20 Jun 22:12
c2081fe

Patch Changes

  • #16 d61c771 Thanks @kkukielka! - Render Mermaid diagrams in color. Previously diagrams were passed to beautiful-mermaid with no palette, so every color was derived from a single dark foreground and the output looked monochrome. They now default to a palette that mirrors mermaid.js's familiar look (lavender node fills, purple borders, dark edges), and a new diagramTheme prop on BlocksRenderer accepts either a built-in theme name (github-light, github-dark, dracula, nord, tokyo-night, …) or a custom color object ({ bg, fg, line, accent, muted, surface, border }). The theme also propagates to diagrams nested inside callout and details blocks.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 20 Jun 18:36
916ffd4

Minor Changes

  • #12 26e1a4a Thanks @kkukielka! - Add support for the details (collapsible) block. It renders a native, accessible <details> / <summary> disclosure with zero client-side JavaScript, honors defaultOpen via the HTML open attribute, supports arbitrarily nested details, and ships a scoped GitHub-inspired stylesheet (retheme via --bb-details-* custom properties). Replace the markup entirely through the blocks.details prop.

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 20 Jun 17:23
e544478

Patch Changes

  • e242e0a Thanks @kkukielka! - Fix bottom-heavy callout spacing and align callout styling with GitHub's light alert palette. The body's outer margins now collapse correctly (the scoped :first-child/:last-child rules are applied via :global() so they reach the cross-component body blocks), an ~8% accent-tinted background is added to match the editor preview, and the title spacing and per-variant colors match GitHub's official tokens.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 19 Jun 22:07
b9ac17c

Minor Changes

  • #6 43d33b5 Thanks @kkukielka! - Add support for callout (admonition) nodes from the Better Blocks plugin ({ type: 'callout', variant, title?, children }). Callouts render GitHub-style in five variants — note, tip, important, warning, caution — as an <aside role="note"> with a colored left border, a title row (icon + label, or the node's custom title), and the nested block children rendered recursively. Colors ship in a scoped <style> (zero client-side JavaScript) and adapt to dark mode via prefers-color-scheme; the per-variant accent is exposed as a --bb-callout-accent custom property for easy retheming. The block can be overridden with a custom callout component that receives variant and title (children via <slot />).

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 19 Jun 20:34
caa67e3

Minor Changes

  • #4 7930308 Thanks @kkukielka! - Add support for block-level Mermaid diagram nodes from the Better Blocks plugin ({ type: 'diagram', format: 'mermaid', value }). Diagrams are pre-rendered to inline SVG on the server with beautiful-mermaid, so the output is static HTML with zero client-side JavaScript — no browser, no hydration, no Chromium download. Supported diagram types (flowchart, sequence, state, class, ER, xychart) render to <div class="mermaid-diagram">; unsupported types and parse errors fall back to the raw source in <pre class="mermaid-source"> so content is never lost. The block can be overridden with a custom diagram renderer that receives code and format props.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 19 Jun 13:22
a604ebc

Minor Changes

  • #1 237946b Thanks @kkukielka! - Initial release. Native Astro renderer for Strapi v5 Blocks content with full Better Blocks support — paragraphs, headings, lists (ordered/unordered/todo), links, quotes, code, images, horizontal lines, tables, media embeds, and KaTeX math, plus all text modifiers (bold, italic, underline, strikethrough, code, uppercase, super/subscript, color, background color, font family, font size). Renders to static HTML with zero client-side JavaScript and supports custom block/modifier renderers via Astro components.