github emdash-cms/emdash emdash@0.29.0

latest releases: @emdash-cms/x402@0.29.0, @emdash-cms/auth@0.29.0, @emdash-cms/gutenberg-to-portable-text@0.29.0...
4 hours ago

Minor Changes

  • #1535 0360900 Thanks @MA2153! - Adds an HTTP API for content references: relation-definition CRUD under /_emdash/api/relations (editor-readable, admin-writable) and directed reference edges on content entries under /_emdash/api/content/:collection/:id/references/:relation/{children,parents} (ownership-aware). References are stored only in the references table — no collection column. The edge reads are cursor-paginated (?cursor/?limit, default 50, max 100) and return nextCursor; each resolved entry carries the locale of the variant returned.

  • #1874 1526f96 Thanks @Vallhalen! - MCP content_create and content_update now accept a taxonomies field
    ({ [taxonomyName]: [termSlug, ...] }) that assigns taxonomy terms in the
    same transaction as the content write. Term slugs are resolved in the entry's
    locale via the same code path as the /terms/{taxonomy} REST route, so the
    two entry points can't drift. Also exposed on the REST POST and PUT
    content endpoints for parity. Fixes #953.

  • #1719 7c5de08 Thanks @swissky! - Adds a taxonomies:read plugin capability with read-only taxonomy access: plugins that declare it get ctx.taxonomies to list taxonomy definitions (getAll()), fetch the terms of a taxonomy (getTerms()), and read the terms assigned to a content entry (getEntryTerms()) — in-process and in both sandbox runners.

  • #1578 58f594b Thanks @marcusbellamyshaw-cell! - Implements pagination for search() and searchCollection()

    search() advertised keyset pagination through its types (options.cursor, SearchResponse.nextCursor) but never read the cursor or returned one, so results were silently capped at limit with no way to load a second page.

    Both search() and searchCollection() now honour cursor and return a nextCursor whenever more matches exist. Pass the previous nextCursor back as cursor to walk subsequent pages; it becomes undefined on the last page. The /_emdash/api/search endpoint accepts a cursor query parameter and returns nextCursor in its response (a malformed cursor returns a 400 INVALID_CURSOR).

    let cursor: string | undefined;
    do {
    	const { items, nextCursor } = await search("quarterly report", {
    		limit: 20,
    		cursor,
    	});
    	render(items);
    	cursor = nextCursor;
    } while (cursor);
  • #1867 c57b12b Thanks @khoinguyenpham04! - Adds an admin REST endpoint and EmDashClient.mediaRepairUsage() client method for repairing content media usage indexes by collection or across all collections.

  • #1886 60811c0 Thanks @swissky! - Adds a toolbar config option for reliable editor-toolbar delivery behind shared caches. toolbar: "client" keeps public HTML identical for every visitor and shows a client-side "Edit" pill for logged-in editors that opens a fresh, uncached editor render via an _edit query param; toolbar: false disables the toolbar entirely. The toolbar can now also be dismissed in the browser via its × button. The default ("server") is unchanged.

Patch Changes

  • #1865 582ea2c Thanks @khoinguyenpham04! - Fixes the admin dashboard scheduled-content summary so it counts entries with pending schedules instead of inferring the count from other statuses.

  • #1857 77e8968 Thanks @swissky! - Speeds up the admin content-list search on collections with full-text search enabled: the filter is now served from the FTS5 index (token-prefix matching plus slug-prefix lookup) instead of scanning every row. Collections without search enabled, and PostgreSQL databases, keep the previous substring matching.

  • #1905 e12f393 Thanks @swissky! - Fixes multi-paragraph blockquotes splitting into separate quotes: consecutive quote paragraphs now render as a single blockquote on the site and load as one quote block in the editor, so merging them no longer reverts on reload.

  • #1854 e4e76f5 Thanks @swissky! - Fixes comment submissions bypassing Turnstile: when the EMDASH_TURNSTILE_SECRET_KEY (or TURNSTILE_SECRET_KEY) environment variable is set, the public comment endpoint now verifies the submitted Turnstile token server-side and rejects submissions without a valid one. Sites without a configured secret key are unaffected.

  • #1550 cbc7d6b Thanks @marcusbellamyshaw-cell! - Fixes search across all collections failing with D1_ERROR: no such column: c.title when any search-enabled collection has no title field (#1178). title is an optional field, not a guaranteed column, so calling search (or the MCP search tool) without a collections filter could error instead of searching everything. Cross-collection search now works regardless of which collections define a title; results from a collection without one simply omit the title, and autocomplete suggestions skip such collections rather than erroring.

  • #1907 15f4057 Thanks @swissky! - Adds hreflang alternate links to the page head for translated content. <EmDashHead> now emits a <link rel="alternate" hreflang="..."> per published translation (plus x-default) automatically, and a new getHreflangAlternates() helper resolves the same set for hand-rolled heads.

  • #1875 b116525 Thanks @ascorbic! - Fixes a database stampede on Postgres when a pending migration fails at runtime: requests no longer pile up waiting on the migration lock, failed migrations are retried with a backoff instead of on every request, and failed attempts no longer leak idle database connections.

  • #1855 450ea81 Thanks @swissky! - Fixes preview and editor-toolbar responses being stored in the shared edge cache when route caching is enabled: requests with a _preview token and toolbar-injected editor pages now opt out of the route cache, so draft content is no longer served from the cache without token verification and toolbar markup no longer leaks to anonymous visitors.

  • #1892 9c0733f Thanks @ascorbic! - Fixes taxonomy term counts (Categories/Tags widgets, term pages, and the admin term list) so they only include content that is publicly visible: published or scheduled-and-due entries that have not been trashed. Counts are now also scoped to the taxonomy's declared collections.

  • Updated dependencies [582ea2c, 582ea2c, d2f5ddc, d237e96, 9792226, 7c5de08, 60811c0]:

    • @emdash-cms/admin@0.29.0
    • @emdash-cms/plugin-types@0.2.0
    • @emdash-cms/registry-client@0.3.3
    • @emdash-cms/auth@0.29.0
    • @emdash-cms/gutenberg-to-portable-text@0.29.0

Don't miss a new emdash release

NewReleases is sending notifications on new releases.