Skip to content

v2.0.19

Latest

Choose a tag to compare

@SoonIter SoonIter released this 30 Jul 06:33
5efbc5d

Highlights

🤖 Guide AI agents from generated Markdown

When SSG-MD is enabled, every generated Markdown page now starts with an agent-readable directive pointing to llms.txt, llms-full.txt, and the Markdown version of the current page:

> For AI agents: the complete documentation index is available at https://example.com/llms.txt, the full documentation bundle is available at https://example.com/llms-full.txt, and this page is available as Markdown at https://example.com/guide/index.md.
image

This extends the existing HTML hint to Markdown output. Its URLs automatically respect siteOrigin, base, locale, and version prefixes, helping agents discover the right machine-readable content from either format.

Documentation: SSG-MD · injectLlmsHint

Related PR: #3544

🎨 Add icons to generated sidebars and navigation

Use icon to display an image, inline SVG, emoji, external URL, or data URL before sidebar and navbar labels. Auto-generated sidebars support icons on groups, items, and section headers through _meta.json or page frontmatter, while navigation icons can be configured through _nav.json or themeConfig.nav.

For a local image, place it in public and reference it with an absolute path:

[
  {
    "type": "file",
    "name": "introduction",
    "label": "Introduction",
    "icon": "/icon.png",
    "tag": "new"
  }
]

Icons render before the label, while an existing tag remains on the right.

image

Documentation: Sidebar icons and tags · nav · sidebar

Related PR: #3554

⚡ Speed up lastUpdated on large sites

Rspress now resolves Git history for all documentation pages in one batched pass instead of spawning one git log process per page. Existing lastUpdated configuration remains unchanged:

import { defineConfig } from '@rspress/core';

export default defineConfig({
  themeConfig: {
    lastUpdated: true,
  },
});

In the PR benchmark, Rspress resolved metadata for its 208-page documentation site with two Git processes in about 300 ms. This avoids the process storms that could make large sites spend minutes resolving page metadata.

Documentation: lastUpdated

Related PR: #3545

What's Changed

New Features 🎉

  • feat(theme/Llms): support llms directive hints in Markdown by @SoonIter in #3544
  • feat(auto-nav-sidebar): support icon field in sidebar and navbar by @SoonIter in #3554

Performance 🚀

  • perf(core): resolve lastUpdated with a single git process by @fi3ework in #3545

Bug Fixes 🐞

  • fix(plugin-playground): support HMR updates by @SoonIter in #3532
  • fix(route/i18n): redirect locale before hydration and migrate to route.localeRedirect by @SoonIter in #3534
  • fix(core): declare public type dependencies by @SoonIter in #3540
  • fix(core): preserve async config inference by @chenjiahan in #3541
  • fix(theme/outline): hide dividers without content by @SoonIter in #3556
  • fix(plugin-playground): scope Monaco preloads to playground pages by @SoonIter in #3559
  • fix(ssg-md): preserve MDX exports by @SoonIter in #3562
  • fix(theme/llmsUI): warn when copying Markdown in dev by @SoonIter in #3563

Refactor 🔨

  • refactor(core/rsbuild): reuse Rsbuild restart lifecycle by @SoonIter in #3537
  • refactor(core): remove redundant AST filtering by @chenjiahan in #3558

Document 📖

Other Changes

Full Changelog: v2.0.18...v2.0.19