chore: release Docusaurus 3.1.1 (#9793)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Joey Clover <joey@popos.local>
Co-authored-by: reece-white <93522192+reece-white@users.noreply.github.com>
Co-authored-by: Shreesh Nautiyal <114166000+Shreesh09@users.noreply.github.com>
Co-authored-by: Nick Gerleman <nick@nickgerleman.com>
Co-authored-by: Chongyi Zheng <git@zcy.dev>
Co-authored-by: MCR Studio <99176216+mcrstudio@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: Ivan Mar (sOkam!) <7308253+heysokam@users.noreply.github.com>
Co-authored-by: c0h1b4 <dwidman@gmail.com>
Co-authored-by: Janessa Garrow <janessa.garrow@gmail.com>
Co-authored-by: ozaki <29860391+OzakIOne@users.noreply.github.com>
Co-authored-by: axmmisaka <6500159+axmmisaka@users.noreply.github.com>
Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
Co-authored-by: Sanjaiyan Parthipan <parthipankalayini@gmail.com>
Co-authored-by: Jack Robson <143492403+jack-robson@users.noreply.github.com>
Co-authored-by: dawei-wang <dawei-wang@users.noreply.github.com>
Co-authored-by: eitsupi <50911393+eitsupi@users.noreply.github.com>
fix(create-docusaurus): fix readme docusaurus 2 ref (#9487)
fix(theme): fix firefox CSS :has() support bug (#9530)
fix(theme): docs html sidebar items should always be visible (#9531)
fix: v3 admonitions should support v2 title syntax for nested admonitions (#9535)
fix(theme-classic): fixed wrong cursor on dropdown menu in navbar, when window is small (#9398)
fix(theme): upgrade prism-react-renderer, fix html script and style tag highlighting (#9567)
fix: add v2 retrocompatible support for quoted admonitions (#9570)
fix(i18n): complete translations for theme-common.json Brazilian Portuguese (pt-BR) (#9477)
fix(content-blog): add baseUrl for author.image_url (#9581)
fix(type-aliases): add `title` prop for imported inline SVG React components (#9612)
fix(utils): Markdown link replacement with <> but no spaces (#9617)
fix(live-codeblock): stabilize react-live transformCode callback, fix editor/preview desync (#9631)
fix(cli): output help when no conventional config + no subcommand (#9648)
fix CI job (#9604)
fix Lint Autofix workflow (#9632)
fix(pwa-plugin): upgrade workbox (#9668)
fix(create-docusaurus): fix init template code blocks, and little improvements (#9696)
fix(theme): allow empty code blocks and live playgrounds (#9704)
fix(core): various broken anchor link fixes (#9732)
fix: remove old useless mdx typedefs (#9733)
fix(theme-common): fix missing code block MagicComments style in Visual Basic (.NET) 16 (#9727)
fix(core): conditionally include `hostname` parameter when using… (#9407)
fix(create-docusaurus): fix typo in init template sample docs (#9783)
fix(mdx-loader): allow spaces before `mdx-code-block` info string (#9776)
fix(core): links with target "_blank" should no be checked by the broken link checker (#9788)
fix(core): broken links optimization behaves differently than non-optimized logic (#9791)
This commit is contained in:
Sébastien Lorber 2024-01-26 14:11:06 +01:00 committed by GitHub
parent 7b1b89041f
commit 72dcd0d8c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 3782 additions and 350 deletions

View file

@ -33,7 +33,7 @@ website
`website/src/theme/Navbar.js` takes precedence whenever `@theme/Navbar` is imported. This behavior is called component swizzling. If you are familiar with Objective C where a function's implementation can be swapped during runtime, it's the exact same concept here with changing the target `@theme/Navbar` is pointing to!
We already talked about how the "userland theme" in `src/theme` can re-use a theme component through the [`@theme-original`](#wrapping) alias. One theme package can also wrap a component from another theme, by importing the component from the initial theme, using the `@theme-init` import.
We already talked about how the "userland theme" in `src/theme` can re-use a theme component through the [`@theme-original`](../swizzling.mdx#wrapping) alias. One theme package can also wrap a component from another theme, by importing the component from the initial theme, using the `@theme-init` import.
Here's an example of using this feature to enhance the default theme `CodeBlock` component with a `react-live` playground feature.

View file

@ -25,7 +25,7 @@ npm install --save @docusaurus/plugin-content-blog
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the [preset options](#ex-config-preset).
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -19,7 +19,7 @@ npm install --save @docusaurus/plugin-content-docs
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -19,7 +19,7 @@ npm install --save @docusaurus/plugin-content-pages
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -49,7 +49,7 @@ npm install --save @docusaurus/plugin-debug
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -35,7 +35,7 @@ npm install --save @docusaurus/plugin-google-analytics
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -31,7 +31,7 @@ npm install --save @docusaurus/plugin-google-gtag
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -31,7 +31,7 @@ npm install --save @docusaurus/plugin-google-tag-manager
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -25,7 +25,7 @@ npm install --save @docusaurus/plugin-sitemap
If you use the preset `@docusaurus/preset-classic`, you don't need to install this plugin as a dependency.
You can configure this plugin through the [preset options](#ex-config-preset).
You can configure this plugin through the [preset options](../../using-plugins.mdx#docusauruspreset-classic).
:::

View file

@ -627,24 +627,18 @@ Usage example:
```js title="MyHeading.js"
import useBrokenLinks from '@docusaurus/useBrokenLinks';
export default function MyHeading({id, ...props}): JSX.Element {
const brokenLinks = useBrokenLinks();
brokenLinks.collectAnchor(id);
return <h2 id={id}>Heading</h2>;
export default function MyHeading(props) {
useBrokenLinks().collectAnchor(props.id);
return <h2 {...props} />;
}
```
```js title="MyLink.js"
import useBrokenLinks from '@docusaurus/useBrokenLinks';
export default function MyLink({targetLink, ...props}): JSX.Element {
const brokenLinks = useBrokenLinks();
brokenLinks.collectLink(targetLink);
return <a href={targetLink}>Link</a>;
export default function MyLink(props) {
useBrokenLinks().collectLink(props.href);
return <a {...props} />;
}
```

View file

@ -61,11 +61,11 @@ export default {
};
```
If you use the doc shorthand or [autogenerated](#sidebar-item-autogenerated) sidebar, you would lose the ability to customize the sidebar label through item definition. You can, however, use the `sidebar_label` Markdown front matter within that doc, which has higher precedence over the `label` key in the sidebar item. Similarly, you can use `sidebar_custom_props` to declare custom metadata for a doc page.
If you use the doc shorthand or [autogenerated](autogenerated.mdx) sidebar, you would lose the ability to customize the sidebar label through item definition. You can, however, use the `sidebar_label` Markdown front matter within that doc, which has higher precedence over the `label` key in the sidebar item. Similarly, you can use `sidebar_custom_props` to declare custom metadata for a doc page.
:::note
A `doc` item sets an [implicit sidebar association](#sidebar-association). Don't assign the same doc to multiple sidebars: change the type to `ref` instead.
A `doc` item sets an [implicit sidebar association](./multiple-sidebars.mdx#sidebar-association). Don't assign the same doc to multiple sidebars: change the type to `ref` instead.
:::

View file

@ -24,7 +24,7 @@ The migration CLI migrates:
To use the migration CLI, follow these steps:
1. Before using the migration CLI, ensure that `/docs`, `/blog`, `/static`, `sidebars.json`, `siteConfig.js`, `package.json` follow the [structure](#) shown at the start of this page.
1. Before using the migration CLI, ensure that `/docs`, `/blog`, `/static`, `sidebars.json`, `siteConfig.js`, `package.json` follow the expected structure.
2. To migrate your v1 website, run the migration CLI with the appropriate filesystem paths: