`markdown.codeCopyButton` now holds both the button tooltip
(`tooltipText`) and the text shown after copying (`copiedText`),
per-locale overridable via `locales.<index>.markdown.codeCopyButton`.
The copied text is emitted as a `data-copied` attribute on the button
and rendered by the theme with `content: attr(data-copied)`.
BREAKING CHANGE: `markdown.codeCopyButtonTitle` is now
`markdown.codeCopyButton.tooltipText`, and its default changed from
"Copy Code" to "Copy code". The `--vp-code-copy-copied-text-content`
CSS variable and its built-in per-language `:lang()` defaults are
removed - set `codeCopyButton.copiedText` (per locale) instead.
close#4431
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Superseded by the `locales.<index>.markdown` option from #4431, which
the config already uses. Also drops a redundant comment from the locale
config files.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Uses the new `locales.<index>.markdown` option, with the strings
exported from each locale's config file. Labels come from the
translated examples in each locale's markdown guide where available;
the rest (es/pt/ja labels and the note/important/caution set) are
best-effort and open to native-speaker review.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A no-title attribute (`::: tip {no-title}`) renders a container without
its title element, and the theme reduces the top padding for containers
without one. It has no effect on `details`, which always needs its
summary. The docs previously hand-rolled this with a raw div and an
inline style - those are now switched to the new syntax.
close#4928close#4932close#4929
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same emoji token type, shortcuts, and set-replacement semantics, with
fresher emoji data and native types (drops `@types/markdown-it-emoji`).
BREAKING CHANGE: The `defs` property of `markdown.emoji` has been renamed to `definitions`.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop-in for our usage: identical defaults (min-level semantics,
tabindex, unique slug handling) and the same permalink/getTokensText
signatures, with proper ESM types - removing the type patch we carried
for markdown-it-anchor.
BREAKING CHANGE: `markdown.anchor` options are now typed by
`@mdit/plugin-anchor`. Common options (`level`, `slugify`, `permalink`,
`getTokensText`, `tabIndex`, etc.) are unchanged, but the deprecated
markdown-it-anchor permalink options (`permalinkSymbol`,
`renderPermalink`, ...) are no longer accepted. Permalink builders like
`headerLink` are named exports of `@mdit/plugin-anchor` instead of
properties of the plugin.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Also point docs at `themeConfig.lastUpdated.text` instead of the
removed option.
BREAKING CHANGE: The deprecated `themeConfig.lastUpdatedText` option has been removed. Use `themeConfig.lastUpdated.text` instead.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BREAKING CHANGE: The `markdown.image.lazyLoading` option has been renamed to `markdown.image.lazyLoad`.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
**BREAKING CHANGE:**
The previous `<!-- @include: ./path/to/file -->` syntax silently ignored errors when files did not exist. This behavior was originally intended as an escape hatch while documenting includes, but better solutions now exist using Shiki transformers.
For most users, no code changes are required. If you now see errors, it means your includes are broken and were previously not being reported.
Users who intentionally reference non-existent files or want to document includes without resolving them can configure `markdown.codeTransformers` with a `postprocess` hook. See `docs/.vitepress/config.ts` in this repo for an example.
BREAKING CHANGE: `includeFiles` option in `postcssIsolateStyles` now defaults to `[/vp-doc\.css/, /base\.css/]` You can remove explicit `includeFiles` if you were using it just to run it on `vp-doc.css`. To revert back to older behavior pass `includeFiles: [/base\.css/]`. The underlying implementation is changed and `transform` and `exclude` options are no longer supported. Use `postcss-prefix-selector` directly if you've advanced use cases.
BREAKING CHANGE: Uses DocSearch v4 beta. No change is required if you're not customizing the styles of navbar search button or modal. DocSearch AI features are in private beta, you can apply for them at https://forms.gle/iyfb5pC2CiiwszUKA
---------
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
BREAKING CHANGE: `useLocalNav` and `useSidebar` are removed in favor of `useLayout`. To migrate, just do find and replace. Sidebar controls are no longer exported, but I didn't find any usage on GitHub. If there is demand, we can export respective composables later. `DefaultTheme.DocSidebar` and `DefaultTheme.DocLocalNav` types are also removed.
---------
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
Co-authored-by: userquin <userquin@gmail.com>