Changelog

@ogygia/content

Every release of @ogygia/content, newest first.

Latest
0.16.0
Versions
6
  1. 0.16.0 minor

    Minor Changes

    • With content({ markdown }) and image() listed, a local markdown image (![alt](./photo.jpg), relative to the post, spaces and accents included) renders through <Img> with the prose preset (or image({ markdown: { width } })), and a frontmatter value starting with ./ or ../ that names an image becomes a descriptor (accept it in a schema with v.custom<ImageDescriptor>(isImage)). A missing file, an HTML <img> naming a local file (image_markdown_html) and a local image in import.meta.og.md(text) (image_markdown_no_file) fail the build. image({ markdown: false }) leaves markdown images as plain <img>, and image({ markdown: { animated: 'motion' } }) shows a moving markdown image (an animated GIF or WebP) with that preset instead, so its width and sizes pick narrower files (a name image({ presets }) does not declare fails the build with image_option_invalid). import.meta.og.image() works in a markdown page's <script> too.

    Patch Changes

    • A < in markdown prose that cannot start a tag (if it is < 512KB, I <3 it) is text, as CommonMark reads it: the page shows it instead of failing the build with Svelte's tag_invalid_name. A < before a letter, /, ! or ? is left as written, so an inline component (A <Badge count={n + 1}/> here) stays a component, and a < inside a {…} expression is left to Svelte. A remark or rehype plugin that puts a < that cannot start a tag into a text node now gets that character as text.
    • A markdown route page (+page.svx, +layout.md under kit.files.routes) no longer warns content_leaked_to_client: it is the page itself, not a collection's document shipped to the browser. A collection's document named like one outside the routes folder still warns.

    Dependencies: @ogygia/compiler@0.16.0, @ogygia/core@0.16.0, @ogygia/machine@0.16.0

  2. 0.15.0 minor

    Patch Changes

    • Its site components (DocsShell, BlogShell and the rest) are read by ogygia's scan before the server build fixes its features, so their regions' features (the page they read, a kept region) are in the server's code from the start.
    • Sidebar labels no longer look doubled during a navigation's view transition: the sidebar is now one view-transition layer (og-sidebar, named on its <nav>) that shows its new state at once, instead of one layer per row with the old and new snapshots stacked; the active chip still glides beneath the labels (a custom skin that styled the phnav row layers styles ::view-transition-group(og-sidebar) instead).
    • A sidebar in a scrolled panel no longer paints its scrolled-out rows over the page during a navigation's view transition: the themes make the sidebar's panel (its parent) a view-transition layer (og-sidebar-panel) that holds the sidebar and chip layers and clips them to its box, in browsers with nested view-transition groups (Chromium today).

    Dependencies: @ogygia/compiler@0.15.0, @ogygia/core@0.15.0

  3. 0.14.0 minor

    Minor Changes

    • The deprecated ContentEntry type is removed: use ContentRef (a ref, without a body) or Entry (what get() returns, with its body).
    • - @ogygia/content: breaking: snippet_macros and its SnippetMacro type are no longer exported from @ogygia/content/markdown; only the removed Observatory used them, and nothing replaces them.
    • An entry's body (and a format's and a source's) is typed as the AwaitableRegion it is, so await entry.body type-checks without a cast.
    • breaking: frontmatter tags: [svelte] is now a one-item list (['svelte']), as YAML reads a flow sequence; it used to be the string '[svelte]'. A value that should stay a bracketed string (title: [create your own]) needs quotes: title: '[create your own]'. A value that only starts with brackets ([docs](/docs)) stays text.
    • breaking: import.meta.og.md() with a component tag in its prose (<Foo />, <ui.Button />) is now the build error content_md_dynamic; it used to render the tag as an inert unknown element. Use a component for the live part, or put the tag in inline code or a fence to show it as text.
    • The remark and rehype markdown options are typed: each entry is a plugin, a [plugin, ...options] tuple, a unified preset ({ plugins, settings }) or a staged { enforce, plugin }, where they were any before.

    Patch Changes

    • - @ogygia/compiler: new package, ogygia's compiler and its Vite plugin: @ogygia/compiler (the compiler), @ogygia/compiler/vite (ogygia(), definePlugin) and @ogygia/compiler/ids. It uses core only through @ogygia/core/contract; core never depends on it. - @ogygia/core: breaking: the @ogygia/core/vite, @ogygia/core/internal/compiler and @ogygia/core/internal/compiler-ids import paths are gone. Import from ogygia/vite (or @ogygia/compiler/vite), @ogygia/compiler and @ogygia/compiler/ids instead; the names are the same. - @ogygia/core: the types of the ogygia:* virtual modules and the build's switches are named in core (@ogygia/core/contract), so core's own types no longer reach into the compiler. - ogygia: ogygia/vite, ogygia/internal/compiler and ogygia/internal/compiler-ids re-export @ogygia/compiler; apps change nothing. - @ogygia/barrels, @ogygia/cli, @ogygia/content, @ogygia/devtools, @ogygia/federation, @ogygia/flags, @ogygia/postrender, @ogygia/router: they take definePlugin and the compiler from @ogygia/compiler, a new peer dependency (ogygia brings it).
    • Backlinks follow a collection replaced by a dev reload: the index is kept only while it was built from the same collections at their current versions. A replacement with the same size and version could serve the old collection's backlinks.
    • BlogList and BlogPost show a post's date as the day it names; a server west of UTC no longer shows the day before.
    • BlogList with group={false} lists the posts in the order given, as documented, instead of sorting them by date.
    • content({ markdown }) now says content_config_read_first when the svelte config was loaded before it and so read no markdown settings, instead of leaving every markdown file uncompiled with no message.
    • Doc's keepReading prop now sets the "Keep reading" cards, as its docs say; before, the cards always showed the trail's suggested pages.
    • Frame no longer asks the site for its nav tree when its sidebar is replaced or removed.
    • @ogygia/content: a frontmatter key named __proto__ is kept as a plain key of the parsed object, as JSON.parse does, and never changes the object's prototype.
    • A kept search and sidebar follow a new base after a navigation: the search link and palette go to the new base's search page, and the sidebar saves its scroll under the new base.
    • A content page's module script is found as Svelte reads its tag: one with a > inside an attribute value is still the module (no second module script is added), and an instance script whose value only says module is not taken for it.
    • The docs shell's mobile bar is kept across client navigations, and a link picked in its sheet closes the sheet (it stayed open over the new page).
    • A code fence's language, permalink id and file name are escaped into their HTML attributes: an info string can no longer put markup into the page.
    • parseFrontmatter reports a frontmatter block with an empty key or a tab indent as content_frontmatter_invalid printed once (one [ogygia], one link), with the parser's words as the reason, instead of nesting a second prefix and link inside it.
    • A frontmatter list item with a [ or { inside it (title: [see [a, b]]) is now the content_frontmatter_invalid error, as YAML reads it, instead of a list split in the wrong place (['see [a', 'b']).
    • A live.list stream no longer sends a stale first list and then misses an edit that landed while that list was being read.
    • Text taken from markup keeps the words the browser shows: the site search index no longer drops prose between a < and a later > (a < b and c > d), indexes no script or style text, and keeps inline code words; the MCP profile tool quotes an HTML error page by its words, not its CSS or script.
    • An outline read before its collection has loaded is woven once, not again on the next read.
    • - @ogygia/core, ogygia: breaking: the internal internal/compiler-browser and internal/compiler-browser-full import paths are gone. The compiler runs in Node only; use @ogygia/core/internal/compiler there. - @ogygia/cli: breaking: the ogygia mcp server no longer has the ogygia_observatory tool; the Observatory it linked to is gone. - @ogygia/content: its macros and markdown pipeline read the compiler through @ogygia/core/internal/compiler and Node's own fs, path and crypto.
    • A search hit's excerpt marks the query's terms in one pass, so a term never lands inside another term's <mark> or an HTML entity and breaks the excerpt's markup.
    • site(): a context function that throws is now reported as content_site_context_failed (with the thrown error) instead of being swallowed. The request still reads the public pages only, as before.
    • A tab label, tab group name or ::: container title holding { or } now stays text, instead of being compiled by Svelte as an expression.
    • @ogygia/content: a ::: code-group fence whose info starts with the fence character (~~~ ~x [t]) no longer swallows the tab wrappers after it, and a line whose info holds a backtick is no fence inside ::: tabs / ::: code-group`, as in CommonMark.

    Dependencies: @ogygia/core@0.14.0, @ogygia/compiler@0.14.0, @ogygia/machine@0.14.0

  4. 0.13.0 minor

    Minor Changes

    • The headless on-device search handle is a class: new SearchClient({ base }) replaces search({ base }) (same options, same ready, query() and destroy()).

    Patch Changes

    • The code-block copy button no longer leaves a refused clipboard as an unhandled rejection, and a second copy within the tick keeps the tick for its full time (#365).
    • Content's dev reload lets go of a change it was still waiting on when its dev server closes or restarts.
    • An edit in dev no longer leaves another live connection open: a collection its module's next run replaces closes its connection, clears its retry and leaves the graph (#247).
    • A live list or live get streaming a collection that a dev edit replaced now ends, instead of waiting forever for a change that cannot come (#247).
    • A dimension coordinate whose outline failed to build once builds it again on its next page (#192).
    • One bad live update no longer stops live updates: the entry keeps its last good version, and a dropped live connection is opened again (after a doubling wait) and the whole source read again (#190).
    • A change made while a collection's first read runs, or between a live list's first value and its next pull, is no longer missed (#191).
    • A dropped live connection is opened again under a named policy whose waits are spread (cut by up to a fifth), so every instance a source dropped at once no longer reconnects at the same moment.
    • A markdown highlighter or mdsvex start that fails once (a grammar or plugin that failed to load) no longer breaks markdown until a restart: the next render starts it again (#248).
    • The site's outline (nav, pages, addresses) and its search index follow a live source's changes; a change the outline cannot be woven from keeps the last good outline and says why, and a failed search build is not kept (#193).
    • Every site search query is answered or rejected: a failed query, a failed index load, a worker crash or destroy() no longer leaves one waiting (#207).
    • The search worker downloads its index again for the next query after a failed download, instead of failing every query with the first error.
    • The mobile bar's sheet lets go of its pinned height after a view switch with no glide (both views the same height), and on unmount.
    • A Shiki theme object with no name now highlights (it is named from its contents), two such themes no longer share a highlighter or a fence-cache key, a theme object edited in place is a new fence-cache key, and snippets or alternating highlight() configs reuse one highlighter per set of themes and languages instead of making a new one each time (#366).
    • The sidebar stops saving its panel's scroll position when it unmounts.
    • A folder sidecar (+meta.json, index.md) that fails to load once no longer breaks the collection and its groups until a restart: the next read loads it again (#246).
    • A collection whose first load fails (the source down, its init or a schema check failing) no longer keeps the failure: the next read loads it again (#189).
    • Two git loaders on one repo with another branch or folder each get their own checkout, instead of the second one finding the first one's files (or none) (#288).
    • A markdown file moved to another folder with the same content is compiled again, instead of the markup cache handing it the old path's CSS key (#292).
    • Every ogygia error and warning has a code and a page at ogygiajs.dev/e/<code>: dev prints the wording and the link, a production build prints the link alone ([ogygia] https://ogygiajs.dev/e/<code>?<args>), so the wording stays out of the client and server bundles.
    • A live edit that lands while the outline is still reading a collection (its entries waiting on a relation) is woven in by the next read, instead of the outline from before it staying until the next edit (#326).
    • Removed inline-marker text (---removed---) in a code fence now renders as escaped text, never as live HTML.
    • The search palette's download is asked for again after it fails, and a click while it cannot load follows the trigger's /search link (#272).
    • Ctrl/Cmd+K pressed again while the search palette loads takes the open back, so it stays closed (#279).
    • The search palette shows a failed query's error (and prints content_search_query_failed) instead of keeping the previous term's results up and leaving the rejection unhandled (#273).
    • Packages declare sideEffects (only their .css files run on import), so bundlers drop the modules an app never uses.

    Dependencies: @ogygia/core@0.13.0, @ogygia/machine@0.13.0

  5. 0.12.0 minor

    Dependency updates only @ogygia/content

  6. 0.11.0 minor

    Dependency updates only @ogygia/content