github fuma-nama/fumadocs fumadocs@16.19.0

one hour ago
  • @fumadocs/base-ui@16.19.0
  • fumadocs-core@16.19.0
  • fumadocs-ui@16.19.0

Search Dialog Close Button Name

  • SearchDialogClose keeps its visible text in its accessible name (e.g. "ESC Close Search"), so voice control users can activate it by the label they see.

Main Landmark in Spacious and Glass Layouts

  • The Spacious and Glass layouts wrap the page content in <main>, like the docs, notebook and flux layouts, so pages using them have a main landmark.

Current Page in the Sidebar

  • The active sidebar link has aria-current="page", so screen readers announce which page is the current one. Applies to SidebarItem, SidebarFolderLink and the Glass layout's sidebar.

TOC Popover is No Longer a Banner Landmark

  • The <header> of the mobile TOC popover has role="none", so pages no longer expose a second banner landmark next to the navbar.

Path params at runtime

  • Refactored path params: each file of a dynamic path compiles once, and its content reads the params as props when rendering.
  • Refactored remarkShow: conditions are checked when rendering, and the define option and showElement export are removed.
  • The table of contents, structured data and processed Markdown of a page only include the <show> branches that show for its props, and give the values of its expressions.
  • Headings with expressions get their IDs from the rendered text, and duplicate IDs only count the headings that show.
  • Added the props option of getPage(): the content and outputs of the page follow these props, with its path params.
  • Processed Markdown and search records resolve JSX elements like the page, with the components that it imports or declares and the MDX components of its props.
  • Search records of Fumadocs MDX keep the elements of every component by default, set filterElement of remarkStructure to choose them.
  • Deprecated the components option of getText(), pass MDX components as page props.
  • Added unstable_runtimeOutputs in file data for custom content sources: the plugins export the outputs of a page as functions of its props. Without it, a document with <show> fails to compile.
  • Added rehypeHeading, which gives headings their IDs from code. Fumadocs MDX, @fumadocs/astro and local Markdown enable it.
  • Added slugImportSource of remarkHeading: a module that slugs heading IDs from the rendered text, for a custom slug.
  • The client loader of Fumadocs MDX takes the params of a page: preload(path, params), getComponent(path, params) and useContent(path, props, params).
  • Table of contents titles resolve MDX components from the page props.
  • Loading a page of an async collection or of @fumadocs/astro no longer renders its structured data: structuredData of the loaded page is read without rendering, structuredData() renders it.
  • Added the search target of renderToMarkdown(), which renders search records: asMarkdown() returns the target, so a component can give agents more than search indexes.
  • Added the markdown namespace of replaceSource(), for edits of processed Markdown only.
  • Search records no longer include the imports of included files.
  • The frontmatter in code of Fumadocs MDX can use imports declared after it, and keeps the other variables declared in its statement.
  • @fumadocs/astro supports frontmatter in code and meta files in code, like meta.ts.
  • Async pages of Fumadocs MDX load their content once, and render without suspending again once loaded.

Pierre Highlights Peer Range

  • Allow any 0.x version of @pierre/highlights.

Steps and tab groups across <show>

  • Steps inside <show> are numbered with the steps around them, in the content and the table of contents.
  • A code block inside <show> is a tab of the tab group around it.
  • Fixed a heading like ## 1. Title not becoming a step after a list of ### steps.
  • Sätteri remarkSteps supports steps inside a step, and is faster on pages without steps.

Don't miss a new fumadocs release

NewReleases is sending notifications on new releases.