Skip to content

v2.0.20

Latest

Choose a tag to compare

@SoonIter SoonIter released this 25 Aug 09:53
· 3 commits to main since this release
45bd361

Highlights

🧭 New Blog: How to build an Agent-friendly website

Can an AI agent find, read, and understand your documentation as easily as a human? This new guide shows how Rspress combines llms.txt, SSG-MD, Accept: text/markdown, and injectLlmsHint to build documentation for both humans and Agents—and how AFDocs makes the result measurable.

image

Read the blog: How to build an Agent-friendly website

🔗 Normalize clean URLs before rendering

Static hosts can serve the same page through URLs such as /guide, /guide.html, /guide/, and /guide/index.html. Rspress can now match the actual route first and normalize the browser address bar to the format selected by route.cleanUrls before the page renders:

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

export default defineConfig({
  route: {
    cleanUrls: true,
    cleanUrlsRedirect: true,
  },
});

With this configuration, /guide.html becomes /guide, while /reference/index.html becomes /reference/. Normalization uses history.replaceState, does not reload the page, and preserves base, query parameters, hashes, and existing history state.

This is a browser-side fallback rather than an HTTP 301/308 redirect. Keep server or CDN redirects for canonical SEO behavior.

Documentation: route.cleanUrlsRedirect

Blog: The trailing slash problem in static sites

Related PR: #3571

What's Changed

New Features 🎉

Performance 🚀

  • perf(runtime): mark sideEffects: false for @rspress/shared by @SoonIter in #3587

Bug Fixes 🐞

  • fix(theme/Llms): omit redundant Markdown page hint by @SoonIter in #3567
  • fix(theme): Fixed ToC tooltips that could contain html strings by @elliotcourant in #3588
  • fix: configure Rslint type checking for workspace projects by @elecmonkey in #3599
  • fix(plugin-twoslash): stop tracking hover popup position outside of visible state by @Karibash in #3603
  • fix(ssg-md): include siteOrigin in Markdown links by @SoonIter in #3606
  • fix(route/localeRedirect): avoid false redirect-only detection by @SoonIter in #3609
  • fix(core): normalize persistent cache build dependency path by @hardfist in #3625

Document 📖

Other Changes

New Contributors

Full Changelog: v2.0.19...v2.0.20