Skip to content

v3.7.0

Choose a tag to compare

@58bits 58bits released this 11 Jun 06:00
· 55 commits to main since this release

Highlights

  • @byline/richtext-lexical — added lexicalToMarkdown (exported from /server, with the lexicalEditorToMarkdownServer() factory): a one-way, server-safe serializer that walks stored SerializedEditorState JSON directly — no @lexical/headless, no DOM, no node registration. Coverage mirrors the render serializer (headings, nested lists, GFM tables, code fences, links including internal-link envelopes, inline images with flattened captions, video embeds as links, layout containers flattened to stacked sections). Admonitions emit GFM alerts (> [!NOTE], title as a bold lead paragraph) — deliberately distinct from the editor toggle's ::: dialect; the output is lossy-tolerant by contract and pinned by contract tests.
  • @byline/core — added documentToMarkdown(doc, definition, options): a schema-aware assembler that renders a whole document to one markdown file — YAML frontmatter (title, description, canonical, locale, collection, published, updated), an H1 from useAsTitle, the summary as standfirst, blocks/richtext as the document body, relations as links, and a "content, not configuration" rule (booleans/json render nothing). Rich-text leaves delegate through the new ServerConfig.fields.richText.toMarkdown seam (the sibling of embed/populate), keeping core editor-agnostic; URL resolution arrives via callbacks, keeping routing knowledge out of core.
  • monorepo — the reference app (apps/webapp) now ships the complete agent-readable surface as copyable patterns: .md routes per content locale (TanStack suffixed path params {$path}[.]md, a locale-rewrite carve-out treating .md as content, and a dev-only Vite passthrough plugin), llms.txt and a dynamic sitemap.xml (hreflang alternates) built over one shared published-URL index so the two surfaces cannot drift, an opt-in L1 tagged in-memory cache with collection-hook invalidation (docs/DATA-CACHE-DESIGN.md), and all three advertisement channels — .md URLs, <link rel="alternate" type="text/markdown"> head tags, and strict Accept: text/markdown 302 negotiation that can never divert a browser. The present-state reference is docs/MARKDOWN-EXPORT.md.

Bug Fixes

  • monorepo — the reference app's getServerConfig() now falls back from import.meta.env to process.env so plain tsx scripts (seeds, import-docs) no longer crash inside collection hooks, and supplies sane log/port defaults.

All other @byline/* packages bumped to 3.7.0 in lockstep with no behavioural changes this cycle.