add maxSize of 64MB to the markdown compile result LRUCache, such that
large pages do not grow this cache unboundedly.
change the cache key from JSON.stringify({ src, ts, relativePath })
(which not only included the entire source of each file in each key, but
also instantiated an object and called JSON.stringify), to a simpler
string concatenation with the sha256 hash of src.
Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
Based-on-patch-by: Calum H. (IMB11) <contact@cal.engineer>
Resolve includes through replaceAsync and fs/promises so include
files are read without blocking the event loop while pages render
concurrently.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
It is internal and its only caller passes every argument; apply the
fallbacks at the call site instead of hiding them in the signature
after the required siteConfig parameter.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The dead link check compares resolved links against source-space page
paths, so a link to the original location of a rewritten page passed
the check but 404s in the built site.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Strings baked into pages by the markdown renderer can now be overridden
per locale via `locales.<index>.markdown` in the site config: container
titles (including GitHub-flavored alerts and custom containers) and the
code copy button title. Values resolve against `env.localeIndex` at
render time and fall back to the root markdown options, so the single
shared renderer keeps working unchanged.
close#4431
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BREAKING CHANGES: Internals are modified a bit to better support vite 6 and handle HMR more correctly. For most users this won't need any change on their side.
BREAKING CHANGE: VitePress now runs on Vite 5. Please refer https://vitejs.dev/guide/migration for breaking changes and migration guide if you're relying on some Vite-specific things.
BREAKING CHANGES: `search.options.exclude` for local search is removed in favor of more flexible `search.options._render`
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>