diff --git a/admin/new.docusaurus.io/package.json b/admin/new.docusaurus.io/package.json
index eccd00e8b54c..de550ea91328 100644
--- a/admin/new.docusaurus.io/package.json
+++ b/admin/new.docusaurus.io/package.json
@@ -1,6 +1,6 @@
{
"name": "new.docusaurus.io",
- "version": "2.2.0",
+ "version": "2.3.0",
"private": true,
"scripts": {
"start": "npx --package netlify-cli netlify dev"
diff --git a/lerna.json b/lerna.json
index 146c099d38cc..d7b1554f6054 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.2.0",
+ "version": "2.3.0",
"npmClient": "yarn",
"useWorkspaces": true,
"changelog": {
diff --git a/packages/create-docusaurus/package.json b/packages/create-docusaurus/package.json
index a79e9902fbd1..3b6eda6086b1 100755
--- a/packages/create-docusaurus/package.json
+++ b/packages/create-docusaurus/package.json
@@ -1,6 +1,6 @@
{
"name": "create-docusaurus",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Create Docusaurus apps easily.",
"type": "module",
"repository": {
@@ -22,8 +22,8 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/utils": "2.2.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
"commander": "^5.1.0",
"fs-extra": "^10.1.0",
"lodash": "^4.17.21",
diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json
index dd08b3cb39e7..e3c37260e63e 100644
--- a/packages/create-docusaurus/templates/classic-typescript/package.json
+++ b/packages/create-docusaurus/templates/classic-typescript/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-typescript-template",
- "version": "2.2.0",
+ "version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -15,8 +15,8 @@
"typecheck": "tsc"
},
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/preset-classic": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/preset-classic": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
@@ -24,7 +24,7 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "2.2.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.7.4"
},
diff --git a/packages/create-docusaurus/templates/classic/docusaurus.config.js b/packages/create-docusaurus/templates/classic/docusaurus.config.js
index cbea7b1b4b1b..d664b65021e3 100644
--- a/packages/create-docusaurus/templates/classic/docusaurus.config.js
+++ b/packages/create-docusaurus/templates/classic/docusaurus.config.js
@@ -8,17 +8,22 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
+ favicon: 'img/favicon.ico',
+
+ // Set the production url of your site here
url: 'https://your-docusaurus-test-site.com',
+ // Set the // pathname under which your site is served
+ // For GitHub pages deployment, it is often '//'
baseUrl: '/',
- onBrokenLinks: 'throw',
- onBrokenMarkdownLinks: 'warn',
- favicon: 'img/favicon.ico',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
+ onBrokenLinks: 'throw',
+ onBrokenMarkdownLinks: 'warn',
+
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
@@ -56,6 +61,8 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
+ // Replace with your project's social card
+ image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Site',
logo: {
diff --git a/packages/create-docusaurus/templates/classic/package.json b/packages/create-docusaurus/templates/classic/package.json
index 49f99873d7b8..3c423a60d401 100644
--- a/packages/create-docusaurus/templates/classic/package.json
+++ b/packages/create-docusaurus/templates/classic/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-template",
- "version": "2.2.0",
+ "version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -14,8 +14,8 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/preset-classic": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/preset-classic": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
@@ -23,7 +23,7 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "2.2.0"
+ "@docusaurus/module-type-aliases": "2.3.0"
},
"browserslist": {
"production": [
diff --git a/packages/create-docusaurus/templates/facebook/docusaurus.config.js b/packages/create-docusaurus/templates/facebook/docusaurus.config.js
index c877fbcb0476..69844a2af9e1 100644
--- a/packages/create-docusaurus/templates/facebook/docusaurus.config.js
+++ b/packages/create-docusaurus/templates/facebook/docusaurus.config.js
@@ -13,17 +13,22 @@
const config = {
title: 'My Site',
tagline: 'The tagline of my site',
+ favicon: 'img/favicon.ico',
+
+ // Set the production url of your site here
url: 'https://your-docusaurus-test-site.com',
+ // Set the // pathname under which your site is served
+ // For GitHub pages deployment, it is often '//'
baseUrl: '/',
- onBrokenLinks: 'throw',
- onBrokenMarkdownLinks: 'warn',
- favicon: 'img/favicon.ico',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
+ onBrokenLinks: 'throw',
+ onBrokenMarkdownLinks: 'warn',
+
presets: [
[
'classic',
@@ -53,6 +58,7 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
+ image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Meta Project',
logo: {
diff --git a/packages/create-docusaurus/templates/facebook/package.json b/packages/create-docusaurus/templates/facebook/package.json
index 1e9345099b75..e1e04e6407eb 100644
--- a/packages/create-docusaurus/templates/facebook/package.json
+++ b/packages/create-docusaurus/templates/facebook/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-facebook-template",
- "version": "2.2.0",
+ "version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -18,8 +18,8 @@
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
},
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/preset-classic": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/preset-classic": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"react": "^17.0.2",
diff --git a/packages/create-docusaurus/templates/shared/docs/tutorial-basics/markdown-features.mdx b/packages/create-docusaurus/templates/shared/docs/tutorial-basics/markdown-features.mdx
index 6b3aaaaaaf85..0337f34d6a54 100644
--- a/packages/create-docusaurus/templates/shared/docs/tutorial-basics/markdown-features.mdx
+++ b/packages/create-docusaurus/templates/shared/docs/tutorial-basics/markdown-features.mdx
@@ -51,7 +51,11 @@ You can use absolute paths to reference images in the static directory (`static/
![Docusaurus logo](/img/docusaurus.png)
-You can reference images relative to the current file as well, as shown in [the extra guides](../tutorial-extras/manage-docs-versions.md).
+You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
+
+```md
+![Docusaurus logo](./img/docusaurus.png)
+```
## Code Blocks
diff --git a/packages/create-docusaurus/templates/shared/static/img/docusaurus-social-card.jpg b/packages/create-docusaurus/templates/shared/static/img/docusaurus-social-card.jpg
new file mode 100644
index 000000000000..ffcb448210e1
Binary files /dev/null and b/packages/create-docusaurus/templates/shared/static/img/docusaurus-social-card.jpg differ
diff --git a/packages/docusaurus-cssnano-preset/package.json b/packages/docusaurus-cssnano-preset/package.json
index a2fcd9d3162d..60942313aaa0 100644
--- a/packages/docusaurus-cssnano-preset/package.json
+++ b/packages/docusaurus-cssnano-preset/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/cssnano-preset",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Advanced cssnano preset for maximum optimization.",
"main": "lib/index.js",
"license": "MIT",
diff --git a/packages/docusaurus-logger/package.json b/packages/docusaurus-logger/package.json
index ca5d5ea818f6..2a59bc1d0421 100644
--- a/packages/docusaurus-logger/package.json
+++ b/packages/docusaurus-logger/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/logger",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "An encapsulated logger for semantically formatting console messages.",
"main": "./lib/index.js",
"repository": {
diff --git a/packages/docusaurus-mdx-loader/package.json b/packages/docusaurus-mdx-loader/package.json
index d6dc246f9ab7..5dd0400b3f54 100644
--- a/packages/docusaurus-mdx-loader/package.json
+++ b/packages/docusaurus-mdx-loader/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/mdx-loader",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docusaurus Loader for MDX",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -20,8 +20,8 @@
"dependencies": {
"@babel/parser": "^7.18.8",
"@babel/traverse": "^7.18.8",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/utils": "2.2.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
"@mdx-js/mdx": "^1.6.22",
"escape-html": "^1.0.3",
"file-loader": "^6.2.0",
@@ -37,10 +37,9 @@
"webpack": "^5.73.0"
},
"devDependencies": {
- "@docusaurus/types": "2.2.0",
+ "@docusaurus/types": "2.3.0",
"@types/escape-html": "^1.0.2",
"@types/mdast": "^3.0.10",
- "@types/mermaid": "^8.2.9",
"@types/stringify-object": "^3.3.1",
"@types/unist": "^2.0.6",
"rehype-stringify": "^8.0.0",
diff --git a/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__fixtures__/nesting.md b/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__fixtures__/nesting.md
new file mode 100644
index 000000000000..04cb34755c4f
--- /dev/null
+++ b/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__fixtures__/nesting.md
@@ -0,0 +1,10 @@
+Test nested Admonitions
+
+::::info **Weather**
+On nice days, you can enjoy skiing in the mountains.
+
+:::danger *Storms*
+Take care of snowstorms...
+:::
+
+::::
\ No newline at end of file
diff --git a/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__snapshots__/index.test.ts.snap
index 227eb28b3370..d02da45a66a8 100644
--- a/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__snapshots__/index.test.ts.snap
+++ b/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/__snapshots__/index.test.ts.snap
@@ -42,3 +42,8 @@ exports[`admonitions remark plugin interpolation 1`] = `
"Test admonition with interpolated title/body
My interpolated
title <button style={{color: "red"}} onClick={() => alert("click")}>test body
interpolated content
"
`;
+
+exports[`admonitions remark plugin nesting 1`] = `
+"Test nested Admonitions
+Weather On nice days, you can enjoy skiing in the mountains.
Storms Take care of snowstorms...
"
+`;
diff --git a/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/index.test.ts b/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/index.test.ts
index 3794562bb16d..ee59edf89439 100644
--- a/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/index.test.ts
+++ b/packages/docusaurus-mdx-loader/src/remark/admonitions/__tests__/index.test.ts
@@ -50,4 +50,9 @@ describe('admonitions remark plugin', () => {
const result = await processFixture('interpolation');
expect(result).toMatchSnapshot();
});
+
+ it('nesting', async () => {
+ const result = await processFixture('nesting');
+ expect(result).toMatchSnapshot();
+ });
});
diff --git a/packages/docusaurus-mdx-loader/src/remark/admonitions/index.ts b/packages/docusaurus-mdx-loader/src/remark/admonitions/index.ts
index d6393b8c4529..d7efad2a8151 100644
--- a/packages/docusaurus-mdx-loader/src/remark/admonitions/index.ts
+++ b/packages/docusaurus-mdx-loader/src/remark/admonitions/index.ts
@@ -52,9 +52,20 @@ const plugin: Plugin = function plugin(
const options = normalizeOptions(optionsInput);
const keywords = Object.values(options.keywords).map(escapeRegExp).join('|');
+ const nestingChar = escapeRegExp(options.tag.slice(0, 1));
const tag = escapeRegExp(options.tag);
- const regex = new RegExp(`${tag}(${keywords})(?: *(.*))?\n`);
- const escapeTag = new RegExp(escapeRegExp(`\\${options.tag}`), 'g');
+
+ // resolve th nesting level of an opening tag
+ // ::: -> 0, :::: -> 1, ::::: -> 2 ...
+ const nestingLevelRegex = new RegExp(
+ `^${tag}(?${nestingChar}*)`,
+ );
+
+ const regex = new RegExp(`${tag}${nestingChar}*(${keywords})(?: *(.*))?\n`);
+ const escapeTag = new RegExp(
+ escapeRegExp(`\\${options.tag}${options.tag.slice(0, 1)}*`),
+ 'g',
+ );
// The tokenizer is called on blocks to determine if there is an admonition
// present and create tags for it
@@ -77,6 +88,11 @@ const plugin: Plugin = function plugin(
];
const food = [];
const content = [];
+ // get the nesting level of the opening tag
+ const openingLevel =
+ nestingLevelRegex.exec(opening)!.groups!.nestingLevel!.length;
+ // used as a stack to keep track of nested admonitions
+ const nestingLevels: number[] = [openingLevel];
let newValue = value;
// consume lines until a closing tag
@@ -88,12 +104,32 @@ const plugin: Plugin = function plugin(
next !== -1 ? newValue.slice(idx + 1, next) : newValue.slice(idx + 1);
food.push(line);
newValue = newValue.slice(idx + 1);
- // the closing tag is NOT part of the content
- if (line.startsWith(options.tag)) {
- break;
+ const nesting = nestingLevelRegex.exec(line);
+ idx = newValue.indexOf(NEWLINE);
+ if (!nesting) {
+ content.push(line);
+ continue;
+ }
+ const tagLevel = nesting.groups!.nestingLevel!.length;
+ // first level
+ if (nestingLevels.length === 0) {
+ nestingLevels.push(tagLevel);
+ content.push(line);
+ continue;
+ }
+ const currentLevel = nestingLevels[nestingLevels.length - 1]!;
+ if (tagLevel < currentLevel) {
+ // entering a nested admonition block
+ nestingLevels.push(tagLevel);
+ } else if (tagLevel === currentLevel) {
+ // closing a nested admonition block
+ nestingLevels.pop();
+ // the closing tag is NOT part of the content
+ if (nestingLevels.length === 0) {
+ break;
+ }
}
content.push(line);
- idx = newValue.indexOf(NEWLINE);
}
// consume the processed tag and replace escape sequences
diff --git a/packages/docusaurus-migrate/package.json b/packages/docusaurus-migrate/package.json
index 0b43a166c261..c779e95fcf09 100644
--- a/packages/docusaurus-migrate/package.json
+++ b/packages/docusaurus-migrate/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/migrate",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "A CLI tool to migrate from older versions of Docusaurus.",
"license": "MIT",
"engines": {
@@ -24,8 +24,8 @@
"dependencies": {
"@babel/core": "^7.18.6",
"@babel/preset-env": "^7.18.6",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/utils": "2.2.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
"@mapbox/hast-util-to-jsx": "^2.0.0",
"color": "^4.2.3",
"commander": "^5.1.0",
diff --git a/packages/docusaurus-migrate/src/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus-migrate/src/__tests__/__snapshots__/index.test.ts.snap
index 4fd3d63d75ff..96eea4159332 100644
--- a/packages/docusaurus-migrate/src/__tests__/__snapshots__/index.test.ts.snap
+++ b/packages/docusaurus-migrate/src/__tests__/__snapshots__/index.test.ts.snap
@@ -120,7 +120,7 @@ exports[`migration CLI migrates complex website: write 1`] = `
]
}
],
- "copyright": "Copyright © 2022 Facebook Inc.",
+ "copyright": "Copyright © 2023 Facebook Inc.",
"logo": {
"src": "img/docusaurus_monochrome.svg"
}
@@ -303,7 +303,7 @@ exports[`migration CLI migrates missing versions: write 1`] = `
]
}
],
- "copyright": "Copyright © 2022 Facebook Inc.",
+ "copyright": "Copyright © 2023 Facebook Inc.",
"logo": {
"src": "img/docusaurus_monochrome.svg"
}
@@ -483,7 +483,7 @@ exports[`migration CLI migrates simple website: write 1`] = `
]
}
],
- "copyright": "Copyright © 2022 Facebook Inc.",
+ "copyright": "Copyright © 2023 Facebook Inc.",
"logo": {
"src": "img/docusaurus_monochrome.svg"
}
diff --git a/packages/docusaurus-module-type-aliases/package.json b/packages/docusaurus-module-type-aliases/package.json
index a3ca49abc086..679e22faa609 100644
--- a/packages/docusaurus-module-type-aliases/package.json
+++ b/packages/docusaurus-module-type-aliases/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/module-type-aliases",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docusaurus module type aliases.",
"types": "./src/index.d.ts",
"publishConfig": {
@@ -13,7 +13,7 @@
},
"dependencies": {
"@docusaurus/react-loadable": "5.5.2",
- "@docusaurus/types": "2.2.0",
+ "@docusaurus/types": "2.3.0",
"@types/history": "^4.7.11",
"@types/react": "*",
"@types/react-router-config": "*",
diff --git a/packages/docusaurus-plugin-client-redirects/package.json b/packages/docusaurus-plugin-client-redirects/package.json
index 042b6bf08d07..877190e41367 100644
--- a/packages/docusaurus-plugin-client-redirects/package.json
+++ b/packages/docusaurus-plugin-client-redirects/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-client-redirects",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Client redirects plugin for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -18,18 +18,18 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-common": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-common": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"eta": "^1.12.3",
"fs-extra": "^10.1.0",
"lodash": "^4.17.21",
"tslib": "^2.4.0"
},
"devDependencies": {
- "@docusaurus/types": "2.2.0"
+ "@docusaurus/types": "2.3.0"
},
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
diff --git a/packages/docusaurus-plugin-content-blog/package.json b/packages/docusaurus-plugin-content-blog/package.json
index adb9ab6d012b..3f94945db891 100644
--- a/packages/docusaurus-plugin-content-blog/package.json
+++ b/packages/docusaurus-plugin-content-blog/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-blog",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Blog plugin for Docusaurus.",
"main": "lib/index.js",
"types": "src/plugin-content-blog.d.ts",
@@ -18,13 +18,13 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/mdx-loader": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-common": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/mdx-loader": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-common": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"cheerio": "^1.0.0-rc.12",
"feed": "^4.2.2",
"fs-extra": "^10.1.0",
@@ -35,9 +35,6 @@
"utility-types": "^3.10.0",
"webpack": "^5.73.0"
},
- "devDependencies": {
- "escape-string-regexp": "^4.0.0"
- },
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
"react-dom": "^16.8.4 || ^17.0.0"
diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/__snapshots__/feed.test.ts.snap b/packages/docusaurus-plugin-content-blog/src/__tests__/__snapshots__/feed.test.ts.snap
index bf7d608e30c6..ae568922d131 100644
--- a/packages/docusaurus-plugin-content-blog/src/__tests__/__snapshots__/feed.test.ts.snap
+++ b/packages/docusaurus-plugin-content-blog/src/__tests__/__snapshots__/feed.test.ts.snap
@@ -1,5 +1,37 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`atom filters to the first two entries 1`] = `
+[
+ "
+
+ https://docusaurus.io/myBaseUrl/blog
+ Hello Blog
+ 2021-03-06T00:00:00.000Z
+ https://github.com/jpmonette/feed
+
+ Hello Blog
+ https://docusaurus.io/myBaseUrl/image/favicon.ico
+ Copyright
+
+
+ https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post
+
+ 2021-03-06T00:00:00.000Z
+
+ Test MDX with require calls
]]>
+
+
+
+ https://docusaurus.io/myBaseUrl/blog/mdx-blog-post
+
+ 2021-03-05T00:00:00.000Z
+
+ HTML Heading 1HTML Heading 2 HTML Paragraph
Import DOM
Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Normal Text Italics Text Bold Text
link
]]>
+
+",
+]
+`;
+
exports[`atom has feed item for each post 1`] = `
[
"
@@ -14,7 +46,7 @@ exports[`atom has feed item for each post 1`] = `
Copyright
- /mdx-require-blog-post
+ https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post
2021-03-06T00:00:00.000Z
@@ -22,7 +54,7 @@ exports[`atom has feed item for each post 1`] = `
- /mdx-blog-post
+ https://docusaurus.io/myBaseUrl/blog/mdx-blog-post
2021-03-05T00:00:00.000Z
@@ -30,7 +62,7 @@ exports[`atom has feed item for each post 1`] = `
- /hey/my super path/héllô
+ https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô
2020-08-16T00:00:00.000Z
@@ -40,7 +72,7 @@ exports[`atom has feed item for each post 1`] = `
- /simple/slug
+ https://docusaurus.io/myBaseUrl/blog/simple/slug
2020-08-15T00:00:00.000Z
@@ -52,13 +84,13 @@ exports[`atom has feed item for each post 1`] = `
- /heading-as-title
+ https://docusaurus.io/myBaseUrl/blog/heading-as-title
2019-01-02T00:00:00.000Z
- /date-matter
+ https://docusaurus.io/myBaseUrl/blog/date-matter
2019-01-01T00:00:00.000Z
@@ -67,7 +99,7 @@ exports[`atom has feed item for each post 1`] = `
- /2018/12/14/Happy-First-Birthday-Slash
+ https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash
2018-12-14T00:00:00.000Z
@@ -84,6 +116,37 @@ exports[`atom has feed item for each post 1`] = `
]
`;
+exports[`json filters to the first two entries 1`] = `
+[
+ "{
+ "version": "https://jsonfeed.org/version/1",
+ "title": "Hello Blog",
+ "home_page_url": "https://docusaurus.io/myBaseUrl/blog",
+ "description": "Hello Blog",
+ "items": [
+ {
+ "id": "https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post",
+ "content_html": "Test MDX with require calls
",
+ "url": "https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post",
+ "title": "MDX Blog Sample with require calls",
+ "summary": "Test MDX with require calls",
+ "date_modified": "2021-03-06T00:00:00.000Z",
+ "tags": []
+ },
+ {
+ "id": "https://docusaurus.io/myBaseUrl/blog/mdx-blog-post",
+ "content_html": "HTML Heading 1 HTML Heading 2 HTML Paragraph
Import DOM
Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Normal Text Italics Text Bold Text
link
",
+ "url": "https://docusaurus.io/myBaseUrl/blog/mdx-blog-post",
+ "title": "Full Blog Sample",
+ "summary": "HTML Heading 1",
+ "date_modified": "2021-03-05T00:00:00.000Z",
+ "tags": []
+ }
+ ]
+}",
+]
+`;
+
exports[`json has feed item for each post 1`] = `
[
"{
@@ -93,7 +156,7 @@ exports[`json has feed item for each post 1`] = `
"description": "Hello Blog",
"items": [
{
- "id": "/mdx-require-blog-post",
+ "id": "https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post",
"content_html": "Test MDX with require calls
",
"url": "https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post",
"title": "MDX Blog Sample with require calls",
@@ -102,7 +165,7 @@ exports[`json has feed item for each post 1`] = `
"tags": []
},
{
- "id": "/mdx-blog-post",
+ "id": "https://docusaurus.io/myBaseUrl/blog/mdx-blog-post",
"content_html": "HTML Heading 1 HTML Heading 2 HTML Paragraph
Import DOM
Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Normal Text Italics Text Bold Text
link
",
"url": "https://docusaurus.io/myBaseUrl/blog/mdx-blog-post",
"title": "Full Blog Sample",
@@ -111,7 +174,7 @@ exports[`json has feed item for each post 1`] = `
"tags": []
},
{
- "id": "/hey/my super path/héllô",
+ "id": "https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô",
"content_html": "complex url slug
",
"url": "https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô",
"title": "Complex Slug",
@@ -123,7 +186,7 @@ exports[`json has feed item for each post 1`] = `
]
},
{
- "id": "/simple/slug",
+ "id": "https://docusaurus.io/myBaseUrl/blog/simple/slug",
"content_html": "simple url slug
",
"url": "https://docusaurus.io/myBaseUrl/blog/simple/slug",
"title": "Simple Slug",
@@ -136,7 +199,7 @@ exports[`json has feed item for each post 1`] = `
"tags": []
},
{
- "id": "/heading-as-title",
+ "id": "https://docusaurus.io/myBaseUrl/blog/heading-as-title",
"content_html": "",
"url": "https://docusaurus.io/myBaseUrl/blog/heading-as-title",
"title": "some heading",
@@ -144,7 +207,7 @@ exports[`json has feed item for each post 1`] = `
"tags": []
},
{
- "id": "/date-matter",
+ "id": "https://docusaurus.io/myBaseUrl/blog/date-matter",
"content_html": "date inside front matter
",
"url": "https://docusaurus.io/myBaseUrl/blog/date-matter",
"title": "date-matter",
@@ -155,7 +218,7 @@ exports[`json has feed item for each post 1`] = `
]
},
{
- "id": "/2018/12/14/Happy-First-Birthday-Slash",
+ "id": "https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash",
"content_html": "Happy birthday!
",
"url": "https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash",
"title": "Happy 1st Birthday Slash! (translated)",
@@ -171,6 +234,40 @@ exports[`json has feed item for each post 1`] = `
]
`;
+exports[`rss filters to the first two entries 1`] = `
+[
+ "
+
+
+ Hello Blog
+ https://docusaurus.io/myBaseUrl/blog
+ Hello Blog
+ Sat, 06 Mar 2021 00:00:00 GMT
+ https://validator.w3.org/feed/docs/rss2.html
+ https://github.com/jpmonette/feed
+ en
+ Copyright
+ -
+
+ https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post
+ https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post
+ Sat, 06 Mar 2021 00:00:00 GMT
+
+ Test MDX with require calls ]]>
+
+ -
+
+ https://docusaurus.io/myBaseUrl/blog/mdx-blog-post
+ https://docusaurus.io/myBaseUrl/blog/mdx-blog-post
+ Fri, 05 Mar 2021 00:00:00 GMT
+
+ HTML Heading 1HTML Heading 2 HTML Paragraph
Import DOM
Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Normal Text Italics Text Bold Text
link
]]>
+
+
+ ",
+]
+`;
+
exports[`rss has feed item for each post 1`] = `
[
"
@@ -187,7 +284,7 @@ exports[`rss has feed item for each post 1`] = `
-
https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post
- /mdx-require-blog-post
+ https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post
Sat, 06 Mar 2021 00:00:00 GMT
Test MDX with require calls ]]>
@@ -195,7 +292,7 @@ exports[`rss has feed item for each post 1`] = `
-
https://docusaurus.io/myBaseUrl/blog/mdx-blog-post
- /mdx-blog-post
+ https://docusaurus.io/myBaseUrl/blog/mdx-blog-post
Fri, 05 Mar 2021 00:00:00 GMT
HTML Heading 1HTML Heading 2 HTML Paragraph
Import DOM
Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Normal Text Italics Text Bold Text
link
]]>
@@ -203,7 +300,7 @@ exports[`rss has feed item for each post 1`] = `
-
https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô
- /hey/my super path/héllô
+ https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô
Sun, 16 Aug 2020 00:00:00 GMT
complex url slug]]>
@@ -213,7 +310,7 @@ exports[`rss has feed item for each post 1`] = `
-
https://docusaurus.io/myBaseUrl/blog/simple/slug
- /simple/slug
+ https://docusaurus.io/myBaseUrl/blog/simple/slug
Sat, 15 Aug 2020 00:00:00 GMT
simple url slug]]>
@@ -221,13 +318,13 @@ exports[`rss has feed item for each post 1`] = `
-
https://docusaurus.io/myBaseUrl/blog/heading-as-title
- /heading-as-title
+ https://docusaurus.io/myBaseUrl/blog/heading-as-title
Wed, 02 Jan 2019 00:00:00 GMT
-
https://docusaurus.io/myBaseUrl/blog/date-matter
- /date-matter
+ https://docusaurus.io/myBaseUrl/blog/date-matter
Tue, 01 Jan 2019 00:00:00 GMT
date inside front matter]]>
@@ -236,7 +333,7 @@ exports[`rss has feed item for each post 1`] = `
-
https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash
- /2018/12/14/Happy-First-Birthday-Slash
+ https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash
Fri, 14 Dec 2018 00:00:00 GMT
Happy birthday!]]>
diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts
index b02b620456c4..a1db3f7efd37 100644
--- a/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts
+++ b/packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts
@@ -143,4 +143,56 @@ describe.each(['atom', 'rss', 'json'])('%s', (feedType) => {
).toMatchSnapshot();
fsMock.mockClear();
});
+
+ it('filters to the first two entries', async () => {
+ const siteDir = path.join(__dirname, '__fixtures__', 'website');
+ const outDir = path.join(siteDir, 'build-snap');
+ const siteConfig = {
+ title: 'Hello',
+ baseUrl: '/myBaseUrl/',
+ url: 'https://docusaurus.io',
+ favicon: 'image/favicon.ico',
+ };
+
+ // Build is quite difficult to mock, so we built the blog beforehand and
+ // copied the output to the fixture...
+ await testGenerateFeeds(
+ {
+ siteDir,
+ siteConfig,
+ i18n: DefaultI18N,
+ outDir,
+ } as LoadContext,
+ {
+ path: 'blog',
+ routeBasePath: 'blog',
+ tagsBasePath: 'tags',
+ authorsMapPath: 'authors.yml',
+ include: DEFAULT_OPTIONS.include,
+ exclude: DEFAULT_OPTIONS.exclude,
+ feedOptions: {
+ type: [feedType],
+ copyright: 'Copyright',
+ createFeedItems: async (params) => {
+ const {blogPosts, defaultCreateFeedItems, ...rest} = params;
+ const blogPostsFiltered = blogPosts.filter(
+ (item, index) => index < 2,
+ );
+ return defaultCreateFeedItems({
+ blogPosts: blogPostsFiltered,
+ ...rest,
+ });
+ },
+ },
+ readingTime: ({content, defaultReadingTime}) =>
+ defaultReadingTime({content}),
+ truncateMarker: //,
+ } as PluginOptions,
+ );
+
+ expect(
+ fsMock.mock.calls.map((call) => call[1] as string),
+ ).toMatchSnapshot();
+ fsMock.mockClear();
+ });
});
diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts
index 7d769afe3f69..c6470dae506a 100644
--- a/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts
+++ b/packages/docusaurus-plugin-content-blog/src/__tests__/frontMatter.test.ts
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-import escapeStringRegexp from 'escape-string-regexp';
+import {escapeRegexp} from '@docusaurus/utils';
import {validateBlogPostFrontMatter} from '../frontMatter';
import type {BlogPostFrontMatter} from '@docusaurus/plugin-content-blog';
@@ -57,7 +57,7 @@ function testField(params: {
} catch (err) {
// eslint-disable-next-line jest/no-conditional-expect
expect((err as Error).message).toMatch(
- new RegExp(escapeStringRegexp(message)),
+ new RegExp(escapeRegexp(message)),
);
}
});
diff --git a/packages/docusaurus-plugin-content-blog/src/feed.ts b/packages/docusaurus-plugin-content-blog/src/feed.ts
index 222fcb84b2b5..d62396537e49 100644
--- a/packages/docusaurus-plugin-content-blog/src/feed.ts
+++ b/packages/docusaurus-plugin-content-blog/src/feed.ts
@@ -8,7 +8,7 @@
import path from 'path';
import fs from 'fs-extra';
import logger from '@docusaurus/logger';
-import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
+import {Feed, type Author as FeedAuthor} from 'feed';
import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils';
import {blogPostContainerID} from '@docusaurus/utils-common';
import {load as cheerioLoad} from 'cheerio';
@@ -18,6 +18,7 @@ import type {
PluginOptions,
Author,
BlogPost,
+ BlogFeedItem,
} from '@docusaurus/plugin-content-blog';
async function generateBlogFeed({
@@ -54,14 +55,39 @@ async function generateBlogFeed({
copyright: feedOptions.copyright,
});
+ const createFeedItems =
+ options.feedOptions.createFeedItems ?? defaultCreateFeedItems;
+
+ const feedItems = await createFeedItems({
+ blogPosts,
+ siteConfig,
+ outDir,
+ defaultCreateFeedItems,
+ });
+
+ feedItems.forEach(feed.addItem);
+
+ return feed;
+}
+
+async function defaultCreateFeedItems({
+ blogPosts,
+ siteConfig,
+ outDir,
+}: {
+ blogPosts: BlogPost[];
+ siteConfig: DocusaurusConfig;
+ outDir: string;
+}): Promise {
+ const {url: siteUrl} = siteConfig;
+
function toFeedAuthor(author: Author): FeedAuthor {
return {name: author.name, link: author.url, email: author.email};
}
- await Promise.all(
+ return Promise.all(
blogPosts.map(async (post) => {
const {
- id,
metadata: {
title: metadataTitle,
permalink,
@@ -79,10 +105,11 @@ async function generateBlogFeed({
);
const $ = cheerioLoad(content);
- const feedItem: FeedItem = {
+ const link = normalizeUrl([siteUrl, permalink]);
+ const feedItem: BlogFeedItem = {
title: metadataTitle,
- id,
- link: normalizeUrl([siteUrl, permalink]),
+ id: link,
+ link,
date,
description,
// Atom feed demands the "term", while other feeds use "name"
@@ -99,9 +126,7 @@ async function generateBlogFeed({
return feedItem;
}),
- ).then((items) => items.forEach(feed.addItem));
-
- return feed;
+ );
}
async function createBlogFeedFile({
diff --git a/packages/docusaurus-plugin-content-blog/src/options.ts b/packages/docusaurus-plugin-content-blog/src/options.ts
index 99c4067a9ad8..895814a0c3ff 100644
--- a/packages/docusaurus-plugin-content-blog/src/options.ts
+++ b/packages/docusaurus-plugin-content-blog/src/options.ts
@@ -124,6 +124,7 @@ const PluginOptionSchema = Joi.object({
.default(DEFAULT_OPTIONS.feedOptions.copyright),
}),
language: Joi.string(),
+ createFeedItems: Joi.function(),
}).default(DEFAULT_OPTIONS.feedOptions),
authorsMapPath: Joi.string().default(DEFAULT_OPTIONS.authorsMapPath),
readingTime: Joi.function().default(() => DEFAULT_OPTIONS.readingTime),
diff --git a/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts b/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
index 63d31d5f58c7..59f0f9e53b95 100644
--- a/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
+++ b/packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
@@ -9,12 +9,19 @@ declare module '@docusaurus/plugin-content-blog' {
import type {LoadedMDXContent} from '@docusaurus/mdx-loader';
import type {MDXOptions} from '@docusaurus/mdx-loader';
import type {FrontMatterTag, Tag} from '@docusaurus/utils';
- import type {Plugin, LoadContext} from '@docusaurus/types';
+ import type {DocusaurusConfig, Plugin, LoadContext} from '@docusaurus/types';
+ import type {Item as FeedItem} from 'feed';
import type {Overwrite} from 'utility-types';
export type Assets = {
/**
- * If `metadata.image` is a collocated image path, this entry will be the
+ * If `metadata.yarn workspace website typecheck
+4
+yarn workspace v1.22.19yarn workspace website typecheck
+4
+yarn workspace v1.22.19yarn workspace website typecheck
+4
+yarn workspace v1.22.19image` is a collocated image path, this entry will be the
* bundler-generated image path. Otherwise, it's empty, and the image URL
* should be accessed through `frontMatter.image`.
*/
@@ -255,6 +262,24 @@ declare module '@docusaurus/plugin-content-blog' {
copyright: string;
/** Language of the feed. */
language?: string;
+ /** Allow control over the construction of BlogFeedItems */
+ createFeedItems?: CreateFeedItemsFn;
+ };
+
+ type DefaultCreateFeedItemsParams = {
+ blogPosts: BlogPost[];
+ siteConfig: DocusaurusConfig;
+ outDir: string;
+ };
+
+ type CreateFeedItemsFn = (
+ params: CreateFeedItemsParams,
+ ) => Promise;
+
+ type CreateFeedItemsParams = DefaultCreateFeedItemsParams & {
+ defaultCreateFeedItems: (
+ params: DefaultCreateFeedItemsParams,
+ ) => Promise;
};
/**
@@ -436,6 +461,8 @@ declare module '@docusaurus/plugin-content-blog' {
content: string;
};
+ export type BlogFeedItem = FeedItem;
+
export type BlogPaginatedMetadata = {
/** Title of the entire blog. */
readonly blogTitle: string;
diff --git a/packages/docusaurus-plugin-content-docs/package.json b/packages/docusaurus-plugin-content-docs/package.json
index c5a43d6537bd..b60bb1e76cea 100644
--- a/packages/docusaurus-plugin-content-docs/package.json
+++ b/packages/docusaurus-plugin-content-docs/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-docs",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docs plugin for Docusaurus.",
"main": "lib/index.js",
"sideEffects": false,
@@ -35,13 +35,13 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/mdx-loader": "2.2.0",
- "@docusaurus/module-type-aliases": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/mdx-loader": "2.3.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"@types/react-router-config": "^5.0.6",
"combine-promises": "^1.1.0",
"fs-extra": "^10.1.0",
@@ -56,7 +56,6 @@
"@types/js-yaml": "^4.0.5",
"@types/picomatch": "^2.3.0",
"commander": "^5.1.0",
- "escape-string-regexp": "^4.0.0",
"picomatch": "^2.3.1",
"shelljs": "^0.8.5"
},
diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts
index 55da1682c725..0dc44555f24f 100644
--- a/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts
+++ b/packages/docusaurus-plugin-content-docs/src/__tests__/frontMatter.test.ts
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-import escapeStringRegexp from 'escape-string-regexp';
+import {escapeRegexp} from '@docusaurus/utils';
import {validateDocFrontMatter} from '../frontMatter';
import type {DocFrontMatter} from '@docusaurus/plugin-content-docs';
@@ -57,7 +57,7 @@ function testField(params: {
} catch (err) {
// eslint-disable-next-line jest/no-conditional-expect
expect((err as Error).message).toMatch(
- new RegExp(escapeStringRegexp(message)),
+ new RegExp(escapeRegexp(message)),
);
}
});
diff --git a/packages/docusaurus-plugin-content-docs/src/index.ts b/packages/docusaurus-plugin-content-docs/src/index.ts
index 2b53c960c8f1..ae18564ce33f 100644
--- a/packages/docusaurus-plugin-content-docs/src/index.ts
+++ b/packages/docusaurus-plugin-content-docs/src/index.ts
@@ -336,12 +336,13 @@ export default async function pluginContentDocs(
};
function createMDXLoaderRule(): RuleSetRule {
- const contentDirs = versionsMetadata.flatMap(getContentPathList);
+ const contentDirs = versionsMetadata
+ .flatMap(getContentPathList)
+ // Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
+ .map(addTrailingPathSeparator);
return {
test: /\.mdx?$/i,
- include: contentDirs
- // Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
- .map(addTrailingPathSeparator),
+ include: contentDirs,
use: [
getJSLoader({isServer}),
{
diff --git a/packages/docusaurus-plugin-content-pages/package.json b/packages/docusaurus-plugin-content-pages/package.json
index ba50c4f6a31f..59e1da61ca0d 100644
--- a/packages/docusaurus-plugin-content-pages/package.json
+++ b/packages/docusaurus-plugin-content-pages/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-content-pages",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Pages plugin for Docusaurus.",
"main": "lib/index.js",
"types": "src/plugin-content-pages.d.ts",
@@ -18,11 +18,11 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/mdx-loader": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/mdx-loader": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"fs-extra": "^10.1.0",
"tslib": "^2.4.0",
"webpack": "^5.73.0"
diff --git a/packages/docusaurus-plugin-debug/package.json b/packages/docusaurus-plugin-debug/package.json
index 8553d40ac3f0..418e6e028495 100644
--- a/packages/docusaurus-plugin-debug/package.json
+++ b/packages/docusaurus-plugin-debug/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-debug",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Debug plugin for Docusaurus.",
"main": "lib/index.js",
"types": "src/plugin-debug.d.ts",
@@ -20,9 +20,9 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
"fs-extra": "^10.1.0",
"react-json-view": "^1.21.3",
"tslib": "^2.4.0"
diff --git a/packages/docusaurus-plugin-google-analytics/package.json b/packages/docusaurus-plugin-google-analytics/package.json
index ed92e424eeca..814f08b985fb 100644
--- a/packages/docusaurus-plugin-google-analytics/package.json
+++ b/packages/docusaurus-plugin-google-analytics/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-google-analytics",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Global analytics (analytics.js) plugin for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -18,9 +18,9 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"tslib": "^2.4.0"
},
"peerDependencies": {
diff --git a/packages/docusaurus-plugin-google-gtag/package.json b/packages/docusaurus-plugin-google-gtag/package.json
index a9f2c4330671..cb5c9a1b8b59 100644
--- a/packages/docusaurus-plugin-google-gtag/package.json
+++ b/packages/docusaurus-plugin-google-gtag/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-google-gtag",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Global Site Tag (gtag.js) plugin for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -18,9 +18,9 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"tslib": "^2.4.0"
},
"peerDependencies": {
diff --git a/packages/docusaurus-plugin-google-tag-manager/.npmignore b/packages/docusaurus-plugin-google-tag-manager/.npmignore
new file mode 100644
index 000000000000..03c9ae1e1b54
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/.npmignore
@@ -0,0 +1,3 @@
+.tsbuildinfo*
+tsconfig*
+__tests__
diff --git a/packages/docusaurus-plugin-google-tag-manager/README.md b/packages/docusaurus-plugin-google-tag-manager/README.md
new file mode 100644
index 000000000000..01e213fe34fc
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/README.md
@@ -0,0 +1,7 @@
+# `@docusaurus/plugin-google-tag-manager`
+
+Google Tag Manager plugin for Docusaurus.
+
+## Usage
+
+See [plugin-google-tag-manager documentation](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-google-tag-manager).
diff --git a/packages/docusaurus-plugin-google-tag-manager/package.json b/packages/docusaurus-plugin-google-tag-manager/package.json
new file mode 100644
index 000000000000..41b8a32764f8
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@docusaurus/plugin-google-tag-manager",
+ "version": "2.3.0",
+ "description": "Google Tag Manager (gtm.js) plugin for Docusaurus.",
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
+ "publishConfig": {
+ "access": "public"
+ },
+ "scripts": {
+ "build": "tsc --build",
+ "watch": "tsc --build --watch"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/facebook/docusaurus.git",
+ "directory": "packages/docusaurus-plugin-google-tag-manager"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "react": "^16.8.4 || ^17.0.0",
+ "react-dom": "^16.8.4 || ^17.0.0"
+ },
+ "engines": {
+ "node": ">=16.14"
+ }
+}
diff --git a/packages/docusaurus-plugin-google-tag-manager/src/index.ts b/packages/docusaurus-plugin-google-tag-manager/src/index.ts
new file mode 100644
index 000000000000..10e0c3868ea7
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/src/index.ts
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import {Joi} from '@docusaurus/utils-validation';
+import type {
+ LoadContext,
+ Plugin,
+ OptionValidationContext,
+} from '@docusaurus/types';
+import type {PluginOptions, Options} from './options';
+
+export default function pluginGoogleAnalytics(
+ context: LoadContext,
+ options: PluginOptions,
+): Plugin {
+ const {containerId} = options;
+ const isProd = process.env.NODE_ENV === 'production';
+
+ return {
+ name: 'docusaurus-plugin-google-tag-manager',
+
+ contentLoaded({actions}) {
+ actions.setGlobalData(options);
+ },
+
+ injectHtmlTags() {
+ if (!isProd) {
+ return {};
+ }
+ return {
+ preBodyTags: [
+ {
+ tagName: 'noscript',
+ innerHTML: ``,
+ },
+ ],
+ headTags: [
+ {
+ tagName: 'link',
+ attributes: {
+ rel: 'preconnect',
+ href: 'https://www.googletagmanager.com',
+ },
+ },
+ {
+ tagName: 'script',
+ innerHTML: `window.dataLayer = window.dataLayer || [];`,
+ },
+ {
+ tagName: 'script',
+ innerHTML: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','${containerId}');`,
+ },
+ ],
+ };
+ },
+ };
+}
+
+const pluginOptionsSchema = Joi.object({
+ containerId: Joi.string().required(),
+});
+
+export function validateOptions({
+ validate,
+ options,
+}: OptionValidationContext): PluginOptions {
+ return validate(pluginOptionsSchema, options);
+}
+
+export type {PluginOptions, Options};
diff --git a/packages/docusaurus-plugin-google-tag-manager/src/options.ts b/packages/docusaurus-plugin-google-tag-manager/src/options.ts
new file mode 100644
index 000000000000..6ffe05812a64
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/src/options.ts
@@ -0,0 +1,12 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+export type PluginOptions = {
+ containerId: string;
+};
+
+export type Options = Partial;
diff --git a/packages/docusaurus-plugin-google-tag-manager/src/types.d.ts b/packages/docusaurus-plugin-google-tag-manager/src/types.d.ts
new file mode 100644
index 000000000000..6f6f99f12793
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/src/types.d.ts
@@ -0,0 +1,8 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+///
diff --git a/packages/docusaurus-plugin-google-tag-manager/tsconfig.client.json b/packages/docusaurus-plugin-google-tag-manager/tsconfig.client.json
new file mode 100644
index 000000000000..14bbcd3b6a55
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/tsconfig.client.json
@@ -0,0 +1,15 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "noEmit": false,
+ "composite": true,
+ "incremental": true,
+ "tsBuildInfoFile": "./lib/.tsbuildinfo-client",
+ "module": "esnext",
+ "target": "esnext",
+ "rootDir": "src",
+ "outDir": "lib"
+ },
+ "include": ["src/*.d.ts"],
+ "exclude": ["**/__tests__/**"]
+}
diff --git a/packages/docusaurus-plugin-google-tag-manager/tsconfig.json b/packages/docusaurus-plugin-google-tag-manager/tsconfig.json
new file mode 100644
index 000000000000..1e49538f9ea2
--- /dev/null
+++ b/packages/docusaurus-plugin-google-tag-manager/tsconfig.json
@@ -0,0 +1,13 @@
+{
+ "extends": "../../tsconfig.json",
+ "references": [{"path": "./tsconfig.client.json"}],
+ "compilerOptions": {
+ "noEmit": false,
+ "incremental": true,
+ "tsBuildInfoFile": "./lib/.tsbuildinfo",
+ "rootDir": "src",
+ "outDir": "lib"
+ },
+ "include": ["src"],
+ "exclude": ["**/__tests__/**"]
+}
diff --git a/packages/docusaurus-plugin-ideal-image/package.json b/packages/docusaurus-plugin-ideal-image/package.json
index 639b28e7f8c4..fb7371b83411 100644
--- a/packages/docusaurus-plugin-ideal-image/package.json
+++ b/packages/docusaurus-plugin-ideal-image/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-ideal-image",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).",
"main": "lib/index.js",
"types": "src/plugin-ideal-image.d.ts",
@@ -20,12 +20,12 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/lqip-loader": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/lqip-loader": "2.3.0",
"@docusaurus/responsive-loader": "^1.7.0",
- "@docusaurus/theme-translations": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/theme-translations": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"@endiliey/react-ideal-image": "^0.0.11",
"react-waypoint": "^10.3.0",
"sharp": "^0.30.7",
@@ -33,7 +33,7 @@
"webpack": "^5.73.0"
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "2.2.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
"fs-extra": "^10.1.0"
},
"peerDependencies": {
diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json
index a246140424ec..64a9dabf5ee8 100644
--- a/packages/docusaurus-plugin-pwa/package.json
+++ b/packages/docusaurus-plugin-pwa/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-pwa",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docusaurus Plugin to add PWA support.",
"main": "lib/index.js",
"types": "src/plugin-pwa.d.ts",
@@ -22,12 +22,12 @@
"dependencies": {
"@babel/core": "^7.18.6",
"@babel/preset-env": "^7.18.6",
- "@docusaurus/core": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/theme-translations": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/theme-translations": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"babel-loader": "^8.2.5",
"clsx": "^1.2.1",
"core-js": "^3.23.3",
@@ -40,7 +40,7 @@
"workbox-window": "^6.5.3"
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "2.2.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
"fs-extra": "^10.1.0"
},
"peerDependencies": {
diff --git a/packages/docusaurus-plugin-sitemap/package.json b/packages/docusaurus-plugin-sitemap/package.json
index 1f82e19a317a..d782d741e82f 100644
--- a/packages/docusaurus-plugin-sitemap/package.json
+++ b/packages/docusaurus-plugin-sitemap/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/plugin-sitemap",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Simple sitemap generation plugin for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -18,12 +18,12 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-common": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-common": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"fs-extra": "^10.1.0",
"sitemap": "^7.1.1",
"tslib": "^2.4.0"
diff --git a/packages/docusaurus-preset-classic/package.json b/packages/docusaurus-preset-classic/package.json
index 6234fcf54751..a6f0a086339b 100644
--- a/packages/docusaurus-preset-classic/package.json
+++ b/packages/docusaurus-preset-classic/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/preset-classic",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Classic preset for Docusaurus.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -18,18 +18,19 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/plugin-content-blog": "2.2.0",
- "@docusaurus/plugin-content-docs": "2.2.0",
- "@docusaurus/plugin-content-pages": "2.2.0",
- "@docusaurus/plugin-debug": "2.2.0",
- "@docusaurus/plugin-google-analytics": "2.2.0",
- "@docusaurus/plugin-google-gtag": "2.2.0",
- "@docusaurus/plugin-sitemap": "2.2.0",
- "@docusaurus/theme-classic": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/theme-search-algolia": "2.2.0",
- "@docusaurus/types": "2.2.0"
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/plugin-content-blog": "2.3.0",
+ "@docusaurus/plugin-content-docs": "2.3.0",
+ "@docusaurus/plugin-content-pages": "2.3.0",
+ "@docusaurus/plugin-debug": "2.3.0",
+ "@docusaurus/plugin-google-analytics": "2.3.0",
+ "@docusaurus/plugin-google-gtag": "2.3.0",
+ "@docusaurus/plugin-google-tag-manager": "2.3.0",
+ "@docusaurus/plugin-sitemap": "2.3.0",
+ "@docusaurus/theme-classic": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/theme-search-algolia": "2.3.0",
+ "@docusaurus/types": "2.3.0"
},
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
diff --git a/packages/docusaurus-preset-classic/src/index.ts b/packages/docusaurus-preset-classic/src/index.ts
index c7fe1c825a3e..c1cc099c39bd 100644
--- a/packages/docusaurus-preset-classic/src/index.ts
+++ b/packages/docusaurus-preset-classic/src/index.ts
@@ -40,6 +40,7 @@ export default function preset(
theme,
googleAnalytics,
gtag,
+ googleTagManager,
...rest
} = opts;
@@ -80,6 +81,11 @@ export default function preset(
if (gtag) {
plugins.push(makePluginConfig('@docusaurus/plugin-google-gtag', gtag));
}
+ if (googleTagManager) {
+ plugins.push(
+ makePluginConfig('@docusaurus/plugin-google-gtag', googleTagManager),
+ );
+ }
if (isProd && sitemap !== false) {
plugins.push(makePluginConfig('@docusaurus/plugin-sitemap', sitemap));
}
diff --git a/packages/docusaurus-preset-classic/src/options.ts b/packages/docusaurus-preset-classic/src/options.ts
index 1e65f826fa31..a8fdb68125f2 100644
--- a/packages/docusaurus-preset-classic/src/options.ts
+++ b/packages/docusaurus-preset-classic/src/options.ts
@@ -11,6 +11,7 @@ import type {Options as PagesPluginOptions} from '@docusaurus/plugin-content-pag
import type {Options as SitemapPluginOptions} from '@docusaurus/plugin-sitemap';
import type {Options as GAPluginOptions} from '@docusaurus/plugin-google-analytics';
import type {Options as GtagPluginOptions} from '@docusaurus/plugin-google-gtag';
+import type {Options as GTMPluginOptions} from '@docusaurus/plugin-google-tag-manager';
import type {Options as ThemeOptions} from '@docusaurus/theme-classic';
import type {ThemeConfig as BaseThemeConfig} from '@docusaurus/types';
import type {UserThemeConfig as ClassicThemeConfig} from '@docusaurus/theme-common';
@@ -42,6 +43,7 @@ export type Options = {
* is present.
*/
gtag?: GtagPluginOptions;
+ googleTagManager?: GTMPluginOptions;
};
export type ThemeConfig = BaseThemeConfig &
diff --git a/packages/docusaurus-remark-plugin-npm2yarn/package.json b/packages/docusaurus-remark-plugin-npm2yarn/package.json
index a30882cbbb5e..fe38341730a6 100644
--- a/packages/docusaurus-remark-plugin-npm2yarn/package.json
+++ b/packages/docusaurus-remark-plugin-npm2yarn/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/remark-plugin-npm2yarn",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Remark plugin for converting npm commands to Yarn commands as tabs.",
"main": "lib/index.js",
"publishConfig": {
diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json
index e91e1aa10035..24503d0632fc 100644
--- a/packages/docusaurus-theme-classic/package.json
+++ b/packages/docusaurus-theme-classic/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/theme-classic",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Classic theme for Docusaurus",
"main": "lib/index.js",
"types": "src/theme-classic.d.ts",
@@ -20,18 +20,18 @@
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
},
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/mdx-loader": "2.2.0",
- "@docusaurus/module-type-aliases": "2.2.0",
- "@docusaurus/plugin-content-blog": "2.2.0",
- "@docusaurus/plugin-content-docs": "2.2.0",
- "@docusaurus/plugin-content-pages": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/theme-translations": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-common": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/mdx-loader": "2.3.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
+ "@docusaurus/plugin-content-blog": "2.3.0",
+ "@docusaurus/plugin-content-docs": "2.3.0",
+ "@docusaurus/plugin-content-pages": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/theme-translations": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-common": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"copy-text-to-clipboard": "^3.0.1",
diff --git a/packages/docusaurus-theme-classic/src/__tests__/options.test.ts b/packages/docusaurus-theme-classic/src/__tests__/options.test.ts
index 0e9d13b08db3..69d307f7fdd3 100644
--- a/packages/docusaurus-theme-classic/src/__tests__/options.test.ts
+++ b/packages/docusaurus-theme-classic/src/__tests__/options.test.ts
@@ -62,7 +62,7 @@ describe('themeConfig', () => {
textColor: '#000',
isCloseable: true,
},
- image: 'img/docusaurus-soc.png',
+ image: 'img/docusaurus-social-card.jpg',
navbar: {
style: 'primary',
hideOnScroll: true,
diff --git a/packages/docusaurus-theme-classic/src/getSwizzleConfig.ts b/packages/docusaurus-theme-classic/src/getSwizzleConfig.ts
index 3a800e8617d7..1d5f811cbc31 100644
--- a/packages/docusaurus-theme-classic/src/getSwizzleConfig.ts
+++ b/packages/docusaurus-theme-classic/src/getSwizzleConfig.ts
@@ -20,6 +20,14 @@ export default function getSwizzleConfig(): SwizzleConfig {
description:
'The component used to render multi-line code blocks, generally used in Markdown files.',
},
+ 'CodeBlock/Content': {
+ actions: {
+ eject: 'unsafe',
+ wrap: 'forbidden',
+ },
+ description:
+ 'The folder containing components responsible for rendering different types of CodeBlock content.',
+ },
ColorModeToggle: {
actions: {
eject: 'safe',
@@ -28,6 +36,14 @@ export default function getSwizzleConfig(): SwizzleConfig {
description:
'The color mode toggle to switch between light and dark mode.',
},
+ 'DocBreadcrumbs/Items': {
+ actions: {
+ eject: 'unsafe',
+ wrap: 'forbidden', // Can't wrap a folder
+ },
+ description:
+ 'The components responsible for rendering the breadcrumb items',
+ },
DocCardList: {
actions: {
eject: 'safe',
@@ -36,6 +52,17 @@ export default function getSwizzleConfig(): SwizzleConfig {
description:
'The component responsible for rendering a list of sidebar items cards.\nNotable used on the category generated-index pages.',
},
+ 'DocItem/TOC': {
+ actions: {
+ // Forbidden because it's a parent folder, makes the CLI crash atm
+ // TODO the CLI should rather support --eject
+ // Subfolders can be swizzled
+ eject: 'forbidden',
+ wrap: 'forbidden',
+ },
+ description:
+ 'The DocItem TOC is not directly swizzle-able, but you can swizzle its sub-components.',
+ },
DocSidebar: {
actions: {
eject: 'unsafe', // Too much technical code in sidebar, not very safe atm
@@ -101,6 +128,17 @@ export default function getSwizzleConfig(): SwizzleConfig {
},
description: 'The footer logo',
},
+ Icon: {
+ actions: {
+ // Forbidden because it's a parent folder, makes the CLI crash atm
+ // TODO the CLI should rather support --eject
+ // Subfolders can be swizzled
+ eject: 'forbidden',
+ wrap: 'forbidden',
+ },
+ description:
+ 'The Icon folder is not directly swizzle-able, but you can swizzle its sub-components.',
+ },
'Icon/Arrow': {
actions: {
eject: 'safe',
@@ -220,7 +258,7 @@ export default function getSwizzleConfig(): SwizzleConfig {
wrap: 'forbidden',
},
description:
- 'The Navbar item components mapping. Can be ejected to add custom navbar item types. See https://github.com/facebook/docusaurus/issues/7227.',
+ 'The Navbar item components mapping. Can be ejected to add custom navbar item types.\nSee https://github.com/facebook/docusaurus/issues/7227.',
},
NotFound: {
actions: {
diff --git a/packages/docusaurus-theme-classic/src/theme-classic.d.ts b/packages/docusaurus-theme-classic/src/theme-classic.d.ts
index 032aeb01603c..eac330fc4e6d 100644
--- a/packages/docusaurus-theme-classic/src/theme-classic.d.ts
+++ b/packages/docusaurus-theme-classic/src/theme-classic.d.ts
@@ -1123,38 +1123,17 @@ declare module '@theme/Mermaid' {
}
declare module '@theme/TabItem' {
- import type {ReactNode} from 'react';
+ import type {TabItemProps} from '@docusaurus/theme-common/internal';
- export interface Props {
- readonly children: ReactNode;
- readonly value: string;
- readonly default?: boolean;
- readonly label?: string;
- readonly hidden?: boolean;
- readonly className?: string;
- readonly attributes?: {[key: string]: unknown};
- }
+ export interface Props extends TabItemProps {}
export default function TabItem(props: Props): JSX.Element;
}
declare module '@theme/Tabs' {
- import type {ReactElement} from 'react';
- import type {Props as TabItemProps} from '@theme/TabItem';
+ import type {TabsProps} from '@docusaurus/theme-common/internal';
- export interface Props {
- readonly lazy?: boolean;
- readonly block?: boolean;
- readonly children: readonly ReactElement[];
- readonly defaultValue?: string | null;
- readonly values?: readonly {
- value: string;
- label?: string;
- attributes?: {[key: string]: unknown};
- }[];
- readonly groupId?: string;
- readonly className?: string;
- }
+ export interface Props extends TabsProps {}
export default function Tabs(props: Props): JSX.Element;
}
@@ -1392,3 +1371,7 @@ declare module '@theme/prism-include-languages' {
PrismObject: typeof PrismNamespace,
): void;
}
+
+declare module '@theme/DocBreadcrumbs/Items/Home' {
+ export default function HomeBreadcrumbItem(): JSX.Element;
+}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx
new file mode 100644
index 000000000000..cb8ae8d518b3
--- /dev/null
+++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/index.tsx
@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import React from 'react';
+import Link from '@docusaurus/Link';
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import {translate} from '@docusaurus/Translate';
+import IconHome from '@theme/Icon/Home';
+
+import styles from './styles.module.css';
+
+export default function HomeBreadcrumbItem(): JSX.Element {
+ const homeHref = useBaseUrl('/');
+
+ return (
+
+
+
+
+
+ );
+}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/styles.module.css
new file mode 100644
index 000000000000..81c9f729b749
--- /dev/null
+++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/Items/Home/styles.module.css
@@ -0,0 +1,14 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+.breadcrumbHomeIcon {
+ position: relative;
+ top: 1px;
+ vertical-align: top;
+ height: 1.1rem;
+ width: 1.1rem;
+}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
index 1e296be0bded..74e02efdf119 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
@@ -13,9 +13,8 @@ import {
useHomePageRoute,
} from '@docusaurus/theme-common/internal';
import Link from '@docusaurus/Link';
-import useBaseUrl from '@docusaurus/useBaseUrl';
import {translate} from '@docusaurus/Translate';
-import IconHome from '@theme/Icon/Home';
+import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home';
import styles from './styles.module.css';
@@ -79,24 +78,6 @@ function BreadcrumbsItem({
);
}
-function HomeBreadcrumbItem() {
- const homeHref = useBaseUrl('/');
- return (
-
-
-
-
-
- );
-}
-
export default function DocBreadcrumbs(): JSX.Element | null {
const breadcrumbs = useSidebarBreadcrumbs();
const homePageRoute = useHomePageRoute();
diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/styles.module.css
index 5794e1b3c9fa..a400c5d9e622 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/styles.module.css
+++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/styles.module.css
@@ -9,11 +9,3 @@
--ifm-breadcrumb-size-multiplier: 0.8;
margin-bottom: 0.8rem;
}
-
-.breadcrumbHomeIcon {
- position: relative;
- top: 1px;
- vertical-align: top;
- height: 1.1rem;
- width: 1.1rem;
-}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css
index ee835664bb46..f5e58785e148 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css
+++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css
@@ -7,10 +7,11 @@
@media (min-width: 997px) {
.expandButton {
- position: sticky;
+ position: absolute;
top: 0;
+ right: 0;
+ width: 100%;
height: 100%;
- max-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx
index a88302612113..551ac7c3f39d 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/index.tsx
@@ -60,15 +60,20 @@ export default function DocPageLayoutSidebar({
}
}}>
-
+
+
+ {hiddenSidebar && }
+
-
- {hiddenSidebar && }
);
}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css
index 52a371cc3fb2..f821f3b60564 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css
+++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/Sidebar/styles.module.css
@@ -29,4 +29,11 @@
width: var(--doc-sidebar-hidden-width);
cursor: pointer;
}
+
+ .sidebarViewport {
+ top: 0;
+ position: sticky;
+ height: 100%;
+ max-height: 100vh;
+ }
}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css
index 2516de55e3d4..03c6f2194b09 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css
+++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css
@@ -12,4 +12,5 @@
.docsWrapper {
display: flex;
+ flex: 1 0 auto;
}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css
index 44f11f21cc75..c5026e8bf154 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css
+++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css
@@ -43,4 +43,5 @@
.collapseSidebarButton {
display: none;
+ margin: 0;
}
diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx
index 120f4509c1a1..cbd89b05f661 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/Desktop/Content/index.tsx
@@ -12,6 +12,7 @@ import {
useAnnouncementBar,
useScrollPosition,
} from '@docusaurus/theme-common/internal';
+import {translate} from '@docusaurus/Translate';
import DocSidebarItems from '@theme/DocSidebarItems';
import type {Props} from '@theme/DocSidebar/Desktop/Content';
@@ -41,6 +42,11 @@ export default function DocSidebarDesktopContent({
return (
;
}
+ const anchorTitle = translate(
+ {
+ id: 'theme.common.headingLinkTitle',
+ message: 'Direct link to {heading}',
+ description: 'Title for link to heading',
+ },
+ {
+ heading: typeof props.children === 'string' ? props.children : id,
+ },
+ );
+
return (
{props.children}
-
+ to={`#${id}`}
+ aria-label={anchorTitle}
+ title={anchorTitle}>
-
+
);
}
diff --git a/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx b/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx
index 4a6d316bdf4a..690250554785 100644
--- a/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/Layout/Provider/index.tsx
@@ -9,7 +9,6 @@ import React from 'react';
import {composeProviders} from '@docusaurus/theme-common';
import {
ColorModeProvider,
- TabGroupChoiceProvider,
AnnouncementBarProvider,
DocsPreferredVersionContextProvider,
ScrollControllerProvider,
@@ -21,7 +20,6 @@ import type {Props} from '@theme/Layout/Provider';
const Provider = composeProviders([
ColorModeProvider,
AnnouncementBarProvider,
- TabGroupChoiceProvider,
ScrollControllerProvider,
DocsPreferredVersionContextProvider,
PluginHtmlClassNameProvider,
diff --git a/packages/docusaurus-theme-classic/src/theme/Layout/styles.module.css b/packages/docusaurus-theme-classic/src/theme/Layout/styles.module.css
index b667fe7911e9..162cbd125744 100644
--- a/packages/docusaurus-theme-classic/src/theme/Layout/styles.module.css
+++ b/packages/docusaurus-theme-classic/src/theme/Layout/styles.module.css
@@ -12,6 +12,8 @@ body {
.mainWrapper {
flex: 1 0 auto;
+ display: flex;
+ flex-direction: column;
}
/* Docusaurus-specific utility class */
diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx
index b957573e8cc9..6632be07a421 100644
--- a/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/Navbar/Layout/index.tsx
@@ -12,6 +12,7 @@ import {
useHideableNavbar,
useNavbarMobileSidebar,
} from '@docusaurus/theme-common/internal';
+import {translate} from '@docusaurus/Translate';
import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
import type {Props} from '@theme/Navbar/Layout';
@@ -36,6 +37,11 @@ export default function NavbarLayout({children}: Props): JSX.Element {
return (
+ {children}
+
+ );
+}
+
describe('Tabs', () => {
it('rejects bad Tabs child', () => {
expect(() => {
renderer.create(
-
- Naughty
- Good
- ,
+
+
+ Naughty
+ Good
+
+ ,
);
}).toThrowErrorMatchingInlineSnapshot(
`"Docusaurus error: Bad child : all children of the
component should be , and every should have a unique "value" prop."`,
@@ -30,10 +44,12 @@ describe('Tabs', () => {
it('rejects bad Tabs defaultValue', () => {
expect(() => {
renderer.create(
-
- Tab 1
- Tab 2
- ,
+
+
+ Tab 1
+ Tab 2
+
+ ,
);
}).toThrowErrorMatchingInlineSnapshot(
`"Docusaurus error: The has a defaultValue "bad" but none of its children has the corresponding value. Available values are: v1, v2. If you intend to show no default tab, use defaultValue={null} instead."`,
@@ -42,14 +58,16 @@ describe('Tabs', () => {
it('rejects duplicate values', () => {
expect(() => {
renderer.create(
-
- Tab 1
- Tab 2
- Tab 3
- Tab 4
- Tab 5
- Tab 6
- ,
+
+
+ Tab 1
+ Tab 2
+ Tab 3
+ Tab 4
+ Tab 5
+ Tab 6
+
+ ,
);
}).toThrowErrorMatchingInlineSnapshot(
`"Docusaurus error: Duplicate values "v1, v2" found in . Every value needs to be unique."`,
@@ -58,54 +76,52 @@ describe('Tabs', () => {
it('accepts valid Tabs config', () => {
expect(() => {
renderer.create(
-
-
-
- Tab 1
- Tab 2
-
-
- Tab 1
-
- Tab 2
-
-
-
-
- Tab 1
-
-
- Tab 2
-
-
-
- Tab 1
- Tab 2
-
-
- Tab 1
- Tab 2
-
-
-
- Tab 1
-
-
- Tab 2
-
-
-
- ,
+
+
+ Tab 1
+ Tab 2
+
+
+ Tab 1
+
+ Tab 2
+
+
+
+
+ Tab 1
+
+
+ Tab 2
+
+
+
+ Tab 1
+ Tab 2
+
+
+ Tab 1
+ Tab 2
+
+
+
+ Tab 1
+
+
+ Tab 2
+
+
+ ,
);
}).not.toThrow(); // TODO Better Jest infrastructure to mock the Layout
});
@@ -114,22 +130,60 @@ describe('Tabs', () => {
expect(() => {
const tabs = ['Apple', 'Banana', 'Carrot'];
renderer.create(
-
-
- ({label: t, value: idx}))}
+
+ ({label: t, value: idx}))}
+ // @ts-expect-error: for an edge-case that we didn't write types for
+ defaultValue={0}>
+ {tabs.map((t, idx) => (
// @ts-expect-error: for an edge-case that we didn't write types for
- defaultValue={0}>
- {tabs.map((t, idx) => (
- // @ts-expect-error: for an edge-case that we didn't write types for
-
- {t}
-
- ))}
-
-
- ,
+
+ {t}
+
+ ))}
+
+ ,
+ );
+ }).not.toThrow();
+ });
+ it('rejects if querystring is true, but groupId falsy', () => {
+ expect(() => {
+ renderer.create(
+
+
+ Val1
+ Val2
+
+ ,
+ );
+ }).toThrow(
+ 'Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".',
+ );
+ });
+
+ it('accept querystring=true when groupId is defined', () => {
+ expect(() => {
+ renderer.create(
+
+
+ Val1
+ Val2
+
+ ,
+ );
+ }).not.toThrow();
+ });
+
+ it('accept querystring as string, but groupId falsy', () => {
+ expect(() => {
+ renderer.create(
+
+
+ Val1
+ Val2
+
+ ,
);
}).not.toThrow();
});
diff --git a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx
index 54843fa48ade..59103c8d0714 100644
--- a/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/Tabs/index.tsx
@@ -5,104 +5,27 @@
* LICENSE file in the root directory of this source tree.
*/
-import React, {
- useState,
- cloneElement,
- isValidElement,
- type ReactElement,
-} from 'react';
+import React, {cloneElement} from 'react';
import clsx from 'clsx';
-import useIsBrowser from '@docusaurus/useIsBrowser';
-import {duplicates} from '@docusaurus/theme-common';
import {
useScrollPositionBlocker,
- useTabGroupChoice,
+ useTabs,
} from '@docusaurus/theme-common/internal';
+import useIsBrowser from '@docusaurus/useIsBrowser';
import type {Props} from '@theme/Tabs';
-import type {Props as TabItemProps} from '@theme/TabItem';
-
import styles from './styles.module.css';
-// A very rough duck type, but good enough to guard against mistakes while
-// allowing customization
-function isTabItem(
- comp: ReactElement,
-): comp is ReactElement {
- return 'value' in comp.props;
-}
-
-function TabsComponent(props: Props): JSX.Element {
- const {
- lazy,
- block,
- defaultValue: defaultValueProp,
- values: valuesProp,
- groupId,
- className,
- } = props;
- const children = React.Children.map(props.children, (child) => {
- if (isValidElement(child) && isTabItem(child)) {
- return child;
- }
- // child.type.name will give non-sensical values in prod because of
- // minification, but we assume it won't throw in prod.
- throw new Error(
- `Docusaurus error: Bad child <${
- // @ts-expect-error: guarding against unexpected cases
- typeof child.type === 'string' ? child.type : child.type.name
- }>: all children of the component should be , and every should have a unique "value" prop.`,
- );
- });
- const values =
- valuesProp ??
- // Only pick keys that we recognize. MDX would inject some keys by default
- children.map(({props: {value, label, attributes}}) => ({
- value,
- label,
- attributes,
- }));
- const dup = duplicates(values, (a, b) => a.value === b.value);
- if (dup.length > 0) {
- throw new Error(
- `Docusaurus error: Duplicate values "${dup
- .map((a) => a.value)
- .join(', ')}" found in . Every value needs to be unique.`,
- );
- }
- // When defaultValueProp is null, don't show a default tab
- const defaultValue =
- defaultValueProp === null
- ? defaultValueProp
- : defaultValueProp ??
- children.find((child) => child.props.default)?.props.value ??
- children[0]!.props.value;
- if (defaultValue !== null && !values.some((a) => a.value === defaultValue)) {
- throw new Error(
- `Docusaurus error: The has a defaultValue "${defaultValue}" but none of its children has the corresponding value. Available values are: ${values
- .map((a) => a.value)
- .join(
- ', ',
- )}. If you intend to show no default tab, use defaultValue={null} instead.`,
- );
- }
-
- const {tabGroupChoices, setTabGroupChoices} = useTabGroupChoice();
- const [selectedValue, setSelectedValue] = useState(defaultValue);
+function TabList({
+ className,
+ block,
+ selectedValue,
+ selectValue,
+ tabValues,
+}: Props & ReturnType) {
const tabRefs: (HTMLLIElement | null)[] = [];
const {blockElementScrollPositionUntilNextRender} =
useScrollPositionBlocker();
- if (groupId != null) {
- const relevantTabGroupChoice = tabGroupChoices[groupId];
- if (
- relevantTabGroupChoice != null &&
- relevantTabGroupChoice !== selectedValue &&
- values.some((value) => value.value === relevantTabGroupChoice)
- ) {
- setSelectedValue(relevantTabGroupChoice);
- }
- }
-
const handleTabChange = (
event:
| React.FocusEvent
@@ -111,15 +34,11 @@ function TabsComponent(props: Props): JSX.Element {
) => {
const newTab = event.currentTarget;
const newTabIndex = tabRefs.indexOf(newTab);
- const newTabValue = values[newTabIndex]!.value;
+ const newTabValue = tabValues[newTabIndex]!.value;
if (newTabValue !== selectedValue) {
blockElementScrollPositionUntilNextRender(newTab);
- setSelectedValue(newTabValue);
-
- if (groupId != null) {
- setTabGroupChoices(groupId, String(newTabValue));
- }
+ selectValue(newTabValue);
}
};
@@ -149,61 +68,79 @@ function TabsComponent(props: Props): JSX.Element {
};
return (
-
-
- {values.map(({value, label, attributes}) => (
- tabRefs.push(tabControl)}
- onKeyDown={handleKeydown}
- onClick={handleTabChange}
- {...attributes}
- className={clsx(
- 'tabs__item',
- styles.tabItem,
- attributes?.className as string,
- {
- 'tabs__item--active': selectedValue === value,
- },
- )}>
- {label ?? value}
-
- ))}
-
+
+ {tabValues.map(({value, label, attributes}) => (
+ tabRefs.push(tabControl)}
+ onKeyDown={handleKeydown}
+ onClick={handleTabChange}
+ {...attributes}
+ className={clsx(
+ 'tabs__item',
+ styles.tabItem,
+ attributes?.className as string,
+ {
+ 'tabs__item--active': selectedValue === value,
+ },
+ )}>
+ {label ?? value}
+
+ ))}
+
+ );
+}
- {lazy ? (
- cloneElement(
- children.filter(
- (tabItem) => tabItem.props.value === selectedValue,
- )[0]!,
- {className: 'margin-top--md'},
- )
- ) : (
-
- {children.map((tabItem, i) =>
- cloneElement(tabItem, {
- key: i,
- hidden: tabItem.props.value !== selectedValue,
- }),
- )}
-
+function TabContent({
+ lazy,
+ children,
+ selectedValue,
+}: Props & ReturnType
) {
+ if (lazy) {
+ const selectedTabItem = children.find(
+ (tabItem) => tabItem.props.value === selectedValue,
+ );
+ if (!selectedTabItem) {
+ // fail-safe or fail-fast? not sure what's best here
+ return null;
+ }
+ return cloneElement(selectedTabItem, {className: 'margin-top--md'});
+ }
+ return (
+
+ {children.map((tabItem, i) =>
+ cloneElement(tabItem, {
+ key: i,
+ hidden: tabItem.props.value !== selectedValue,
+ }),
)}
);
}
+function TabsComponent(props: Props): JSX.Element {
+ const tabs = useTabs(props);
+ return (
+
+
+
+
+ );
+}
+
export default function Tabs(props: Props): JSX.Element {
const isBrowser = useIsBrowser();
return (
diff --git a/packages/docusaurus-theme-common/package.json b/packages/docusaurus-theme-common/package.json
index aab6392e825a..3fc7a9ab255e 100644
--- a/packages/docusaurus-theme-common/package.json
+++ b/packages/docusaurus-theme-common/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/theme-common",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Common code for Docusaurus themes.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@@ -30,12 +30,12 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/mdx-loader": "2.2.0",
- "@docusaurus/module-type-aliases": "2.2.0",
- "@docusaurus/plugin-content-blog": "2.2.0",
- "@docusaurus/plugin-content-docs": "2.2.0",
- "@docusaurus/plugin-content-pages": "2.2.0",
- "@docusaurus/utils": "2.2.0",
+ "@docusaurus/mdx-loader": "2.3.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
+ "@docusaurus/plugin-content-blog": "2.3.0",
+ "@docusaurus/plugin-content-docs": "2.3.0",
+ "@docusaurus/plugin-content-pages": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
"@types/history": "^4.7.11",
"@types/react": "*",
"@types/react-router-config": "*",
@@ -43,11 +43,12 @@
"parse-numeric-range": "^1.3.0",
"prism-react-renderer": "^1.3.5",
"tslib": "^2.4.0",
+ "use-sync-external-store": "^1.2.0",
"utility-types": "^3.10.0"
},
"devDependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/types": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/types": "2.3.0",
"fs-extra": "^10.1.0",
"lodash": "^4.17.21"
},
diff --git a/packages/docusaurus-theme-common/src/contexts/tabGroupChoice.tsx b/packages/docusaurus-theme-common/src/contexts/tabGroupChoice.tsx
deleted file mode 100644
index 530b4bc90ad4..000000000000
--- a/packages/docusaurus-theme-common/src/contexts/tabGroupChoice.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-import React, {
- useState,
- useCallback,
- useEffect,
- useMemo,
- useContext,
- type ReactNode,
-} from 'react';
-import {createStorageSlot, listStorageKeys} from '../utils/storageUtils';
-import {ReactContextError} from '../utils/reactUtils';
-
-const TAB_CHOICE_PREFIX = 'docusaurus.tab.';
-
-type ContextValue = {
- /** A map from `groupId` to the `value` of the saved choice. */
- readonly tabGroupChoices: {readonly [groupId: string]: string};
- /** Set the new choice value of a group. */
- readonly setTabGroupChoices: (groupId: string, newChoice: string) => void;
-};
-
-const Context = React.createContext(undefined);
-
-function useContextValue(): ContextValue {
- const [tabGroupChoices, setChoices] = useState<{
- readonly [groupId: string]: string;
- }>({});
- const setChoiceSyncWithLocalStorage = useCallback(
- (groupId: string, newChoice: string) => {
- createStorageSlot(`${TAB_CHOICE_PREFIX}${groupId}`).set(newChoice);
- },
- [],
- );
-
- useEffect(() => {
- try {
- const localStorageChoices: {[groupId: string]: string} = {};
- listStorageKeys().forEach((storageKey) => {
- if (storageKey.startsWith(TAB_CHOICE_PREFIX)) {
- const groupId = storageKey.substring(TAB_CHOICE_PREFIX.length);
- localStorageChoices[groupId] = createStorageSlot(storageKey).get()!;
- }
- });
- setChoices(localStorageChoices);
- } catch (err) {
- console.error(err);
- }
- }, []);
-
- const setTabGroupChoices = useCallback(
- (groupId: string, newChoice: string) => {
- setChoices((oldChoices) => ({...oldChoices, [groupId]: newChoice}));
- setChoiceSyncWithLocalStorage(groupId, newChoice);
- },
- [setChoiceSyncWithLocalStorage],
- );
-
- return useMemo(
- () => ({tabGroupChoices, setTabGroupChoices}),
- [tabGroupChoices, setTabGroupChoices],
- );
-}
-
-export function TabGroupChoiceProvider({
- children,
-}: {
- children: ReactNode;
-}): JSX.Element {
- const value = useContextValue();
- return {children} ;
-}
-
-export function useTabGroupChoice(): ContextValue {
- const context = useContext(Context);
- if (context == null) {
- throw new ReactContextError('TabGroupChoiceProvider');
- }
- return context;
-}
diff --git a/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts b/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts
index 10661b17f0d8..1b22512f588b 100644
--- a/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts
+++ b/packages/docusaurus-theme-common/src/hooks/useSearchPage.ts
@@ -8,6 +8,7 @@
import {useCallback, useEffect, useState} from 'react';
import {useHistory} from '@docusaurus/router';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import type {ThemeConfig as AlgoliaThemeConfig} from '@docusaurus/theme-search-algolia';
const SEARCH_PARAM_QUERY = 'q';
@@ -31,8 +32,11 @@ export function useSearchPage(): {
} {
const history = useHistory();
const {
- siteConfig: {baseUrl},
+ siteConfig: {baseUrl, themeConfig},
} = useDocusaurusContext();
+ const {
+ algolia: {searchPagePath},
+ } = themeConfig as AlgoliaThemeConfig;
const [searchQuery, setSearchQueryState] = useState('');
@@ -65,10 +69,11 @@ export function useSearchPage(): {
const generateSearchPageLink = useCallback(
(targetSearchQuery: string) =>
// Refer to https://github.com/facebook/docusaurus/pull/2838
- `${baseUrl}search?${SEARCH_PARAM_QUERY}=${encodeURIComponent(
- targetSearchQuery,
- )}`,
- [baseUrl],
+ // Note: if searchPagePath is falsy, useSearchPage() will not be called
+ `${baseUrl}${
+ searchPagePath as string
+ }?${SEARCH_PARAM_QUERY}=${encodeURIComponent(targetSearchQuery)}`,
+ [baseUrl, searchPagePath],
);
return {
diff --git a/packages/docusaurus-theme-common/src/index.ts b/packages/docusaurus-theme-common/src/index.ts
index 844fa25cfd0c..4c3863016184 100644
--- a/packages/docusaurus-theme-common/src/index.ts
+++ b/packages/docusaurus-theme-common/src/index.ts
@@ -24,7 +24,11 @@ export {
type ColorModeConfig,
} from './utils/useThemeConfig';
-export {createStorageSlot, listStorageKeys} from './utils/storageUtils';
+export {
+ createStorageSlot,
+ useStorageSlot,
+ listStorageKeys,
+} from './utils/storageUtils';
export {useContextualSearchFilters} from './utils/searchUtils';
diff --git a/packages/docusaurus-theme-common/src/internal.ts b/packages/docusaurus-theme-common/src/internal.ts
index a503fab9837e..680d79ec9437 100644
--- a/packages/docusaurus-theme-common/src/internal.ts
+++ b/packages/docusaurus-theme-common/src/internal.ts
@@ -42,10 +42,8 @@ export {
useAnnouncementBar,
} from './contexts/announcementBar';
-export {
- useTabGroupChoice,
- TabGroupChoiceProvider,
-} from './contexts/tabGroupChoice';
+export {useTabs} from './utils/tabsUtils';
+export type {TabValue, TabsProps, TabItemProps} from './utils/tabsUtils';
export {useNavbarMobileSidebar} from './contexts/navbarMobileSidebar';
export {useNavbarSecondaryMenu} from './contexts/navbarSecondaryMenu/display';
@@ -82,7 +80,11 @@ export {useLocationChange} from './utils/useLocationChange';
export {useLocalPathname} from './utils/useLocalPathname';
-export {useHistoryPopHandler} from './utils/historyUtils';
+export {
+ useHistoryPopHandler,
+ useHistorySelector,
+ useQueryStringValue,
+} from './utils/historyUtils';
export {
useFilteredAndTreeifiedTOC,
diff --git a/packages/docusaurus-theme-common/src/utils/historyUtils.ts b/packages/docusaurus-theme-common/src/utils/historyUtils.ts
index 4c8b89c834f9..a81663feacbf 100644
--- a/packages/docusaurus-theme-common/src/utils/historyUtils.ts
+++ b/packages/docusaurus-theme-common/src/utils/historyUtils.ts
@@ -7,8 +7,11 @@
import {useEffect} from 'react';
import {useHistory} from '@docusaurus/router';
+// @ts-expect-error: TODO temporary until React 18 upgrade
+import {useSyncExternalStore} from 'use-sync-external-store/shim';
import {useEvent} from './reactUtils';
-import type {Location, Action} from 'history';
+
+import type {History, Location, Action} from 'history';
type HistoryBlockHandler = (location: Location, action: Action) => void | false;
@@ -43,3 +46,28 @@ export function useHistoryPopHandler(handler: HistoryBlockHandler): void {
return undefined;
});
}
+
+/**
+ * Permits to efficiently subscribe to a slice of the history
+ * See https://thisweekinreact.com/articles/useSyncExternalStore-the-underrated-react-api
+ * @param selector
+ */
+export function useHistorySelector(
+ selector: (history: History) => Value,
+): Value {
+ const history = useHistory();
+ return useSyncExternalStore(history.listen, () => selector(history));
+}
+
+/**
+ * Permits to efficiently subscribe to a specific querystring value
+ * @param key
+ */
+export function useQueryStringValue(key: string | null): string | null {
+ return useHistorySelector((history) => {
+ if (key === null) {
+ return null;
+ }
+ return new URLSearchParams(history.location.search).get(key);
+ });
+}
diff --git a/packages/docusaurus-theme-common/src/utils/storageUtils.ts b/packages/docusaurus-theme-common/src/utils/storageUtils.ts
index 08ab3be1aee8..c668cfaa4fff 100644
--- a/packages/docusaurus-theme-common/src/utils/storageUtils.ts
+++ b/packages/docusaurus-theme-common/src/utils/storageUtils.ts
@@ -5,12 +5,46 @@
* LICENSE file in the root directory of this source tree.
*/
+import {useCallback, useRef} from 'react';
+// @ts-expect-error: TODO temp error until React 18 upgrade
+import {useSyncExternalStore} from 'use-sync-external-store/shim';
+
const StorageTypes = ['localStorage', 'sessionStorage', 'none'] as const;
export type StorageType = typeof StorageTypes[number];
const DefaultStorageType: StorageType = 'localStorage';
+// window.addEventListener('storage') only works for different windows...
+// so for current window we have to dispatch the event manually
+// Now we can listen for both cross-window / current-window storage changes!
+// see https://stackoverflow.com/a/71177640/82609
+// see https://stackoverflow.com/questions/26974084/listen-for-changes-with-localstorage-on-the-same-window
+function dispatchChangeEvent({
+ key,
+ oldValue,
+ newValue,
+ storage,
+}: {
+ key: string;
+ oldValue: string | null;
+ newValue: string | null;
+ storage: Storage;
+}) {
+ const event = document.createEvent('StorageEvent');
+ event.initStorageEvent(
+ 'storage',
+ false,
+ false,
+ key,
+ oldValue,
+ newValue,
+ window.location.href,
+ storage,
+ );
+ window.dispatchEvent(event);
+}
+
/**
* Will return `null` if browser storage is unavailable (like running Docusaurus
* in an iframe). This should NOT be called in SSR.
@@ -58,12 +92,14 @@ export type StorageSlot = {
get: () => string | null;
set: (value: string) => void;
del: () => void;
+ listen: (onChange: (event: StorageEvent) => void) => () => void;
};
const NoopStorageSlot: StorageSlot = {
get: () => null,
set: () => {},
del: () => {},
+ listen: () => () => {},
};
// Fail-fast, as storage APIs should not be used during the SSR process
@@ -78,6 +114,7 @@ Please only call storage APIs in effects and event handlers.`);
get: throwError,
set: throwError,
del: throwError,
+ listen: throwError,
};
}
@@ -98,39 +135,103 @@ export function createStorageSlot(
if (typeof window === 'undefined') {
return createServerStorageSlot(key);
}
- const browserStorage = getBrowserStorage(options?.persistence);
- if (browserStorage === null) {
+ const storage = getBrowserStorage(options?.persistence);
+ if (storage === null) {
return NoopStorageSlot;
}
return {
get: () => {
try {
- return browserStorage.getItem(key);
+ return storage.getItem(key);
} catch (err) {
console.error(`Docusaurus storage error, can't get key=${key}`, err);
return null;
}
},
- set: (value) => {
+ set: (newValue) => {
try {
- browserStorage.setItem(key, value);
+ const oldValue = storage.getItem(key);
+ storage.setItem(key, newValue);
+ dispatchChangeEvent({
+ key,
+ oldValue,
+ newValue,
+ storage,
+ });
} catch (err) {
console.error(
- `Docusaurus storage error, can't set ${key}=${value}`,
+ `Docusaurus storage error, can't set ${key}=${newValue}`,
err,
);
}
},
del: () => {
try {
- browserStorage.removeItem(key);
+ const oldValue = storage.getItem(key);
+ storage.removeItem(key);
+ dispatchChangeEvent({key, oldValue, newValue: null, storage});
} catch (err) {
console.error(`Docusaurus storage error, can't delete key=${key}`, err);
}
},
+ listen: (onChange) => {
+ try {
+ const listener = (event: StorageEvent) => {
+ if (event.storageArea === storage && event.key === key) {
+ onChange(event);
+ }
+ };
+ window.addEventListener('storage', listener);
+ return () => window.removeEventListener('storage', listener);
+ } catch (err) {
+ console.error(
+ `Docusaurus storage error, can't listen for changes of key=${key}`,
+ err,
+ );
+ return () => {};
+ }
+ },
};
}
+export function useStorageSlot(
+ key: string | null,
+ options?: {persistence?: StorageType},
+): [string | null, StorageSlot] {
+ // Not ideal but good enough: assumes storage slot config is constant
+ const storageSlot = useRef(() => {
+ if (key === null) {
+ return NoopStorageSlot;
+ }
+ return createStorageSlot(key, options);
+ }).current();
+
+ const listen: StorageSlot['listen'] = useCallback(
+ (onChange) => {
+ // Do not try to add a listener during SSR
+ if (typeof window === 'undefined') {
+ return () => {};
+ }
+ return storageSlot.listen(onChange);
+ },
+ [storageSlot],
+ );
+
+ const currentValue = useSyncExternalStore(
+ listen,
+ () => {
+ // TODO this check should be useless after React 18
+ if (typeof window === 'undefined') {
+ return null;
+ }
+ return storageSlot.get();
+ },
+ () => null,
+ );
+
+ return [currentValue, storageSlot];
+}
+
/**
* Returns a list of all the keys currently stored in browser storage,
* or an empty list if browser storage can't be accessed.
diff --git a/packages/docusaurus-theme-common/src/utils/tabsUtils.tsx b/packages/docusaurus-theme-common/src/utils/tabsUtils.tsx
new file mode 100644
index 000000000000..403e023ef45d
--- /dev/null
+++ b/packages/docusaurus-theme-common/src/utils/tabsUtils.tsx
@@ -0,0 +1,266 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import React, {
+ isValidElement,
+ useCallback,
+ useEffect,
+ useState,
+ useMemo,
+ type ReactNode,
+ type ReactElement,
+} from 'react';
+import {useHistory} from '@docusaurus/router';
+import {useQueryStringValue} from '@docusaurus/theme-common/internal';
+import {duplicates, useStorageSlot} from '../index';
+
+/**
+ * TabValue is the "config" of a given Tab
+ * Provided through "values" prop or through the children props
+ */
+export interface TabValue {
+ readonly value: string;
+ readonly label?: string;
+ readonly attributes?: {[key: string]: unknown};
+ readonly default?: boolean;
+}
+
+export interface TabsProps {
+ readonly lazy?: boolean;
+ readonly block?: boolean;
+ readonly children: readonly ReactElement[];
+ readonly defaultValue?: string | null;
+ readonly values?: readonly TabValue[];
+ readonly groupId?: string;
+ readonly className?: string;
+ readonly queryString?: string | boolean;
+}
+
+export interface TabItemProps {
+ readonly children: ReactNode;
+ readonly value: string;
+ readonly default?: boolean;
+ readonly label?: string;
+ readonly hidden?: boolean;
+ readonly className?: string;
+ readonly attributes?: {[key: string]: unknown};
+}
+
+// A very rough duck type, but good enough to guard against mistakes while
+// allowing customization
+function isTabItem(
+ comp: ReactElement,
+): comp is ReactElement {
+ return 'value' in comp.props;
+}
+
+function ensureValidChildren(children: TabsProps['children']) {
+ return React.Children.map(children, (child) => {
+ if (isValidElement(child) && isTabItem(child)) {
+ return child;
+ }
+ // child.type.name will give non-sensical values in prod because of
+ // minification, but we assume it won't throw in prod.
+ throw new Error(
+ `Docusaurus error: Bad child <${
+ // @ts-expect-error: guarding against unexpected cases
+ typeof child.type === 'string' ? child.type : child.type.name
+ }>: all children of the component should be , and every should have a unique "value" prop.`,
+ );
+ });
+}
+
+function extractChildrenTabValues(children: TabsProps['children']): TabValue[] {
+ return ensureValidChildren(children).map(
+ ({props: {value, label, attributes, default: isDefault}}) => ({
+ value,
+ label,
+ attributes,
+ default: isDefault,
+ }),
+ );
+}
+
+function ensureNoDuplicateValue(values: readonly TabValue[]) {
+ const dup = duplicates(values, (a, b) => a.value === b.value);
+ if (dup.length > 0) {
+ throw new Error(
+ `Docusaurus error: Duplicate values "${dup
+ .map((a) => a.value)
+ .join(', ')}" found in . Every value needs to be unique.`,
+ );
+ }
+}
+
+function useTabValues(
+ props: Pick,
+): readonly TabValue[] {
+ const {values: valuesProp, children} = props;
+ return useMemo(() => {
+ const values = valuesProp ?? extractChildrenTabValues(children);
+ ensureNoDuplicateValue(values);
+ return values;
+ }, [valuesProp, children]);
+}
+
+function isValidValue({
+ value,
+ tabValues,
+}: {
+ value: string | null | undefined;
+ tabValues: readonly TabValue[];
+}) {
+ return tabValues.some((a) => a.value === value);
+}
+
+function getInitialStateValue({
+ defaultValue,
+ tabValues,
+}: {
+ defaultValue: TabsProps['defaultValue'];
+ tabValues: readonly TabValue[];
+}): string {
+ if (tabValues.length === 0) {
+ throw new Error(
+ 'Docusaurus error: the component requires at least one children component',
+ );
+ }
+ if (defaultValue) {
+ // Warn user about passing incorrect defaultValue as prop.
+ if (!isValidValue({value: defaultValue, tabValues})) {
+ throw new Error(
+ `Docusaurus error: The has a defaultValue "${defaultValue}" but none of its children has the corresponding value. Available values are: ${tabValues
+ .map((a) => a.value)
+ .join(
+ ', ',
+ )}. If you intend to show no default tab, use defaultValue={null} instead.`,
+ );
+ }
+ return defaultValue;
+ }
+ const defaultTabValue =
+ tabValues.find((tabValue) => tabValue.default) ?? tabValues[0];
+ if (!defaultTabValue) {
+ throw new Error('Unexpected error: 0 tabValues');
+ }
+ return defaultTabValue.value;
+}
+
+function getStorageKey(groupId: string | undefined) {
+ if (!groupId) {
+ return null;
+ }
+ return `docusaurus.tab.${groupId}`;
+}
+
+function getQueryStringKey({
+ queryString = false,
+ groupId,
+}: Pick) {
+ if (typeof queryString === 'string') {
+ return queryString;
+ }
+ if (queryString === false) {
+ return null;
+ }
+ if (queryString === true && !groupId) {
+ throw new Error(
+ `Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".`,
+ );
+ }
+ return groupId ?? null;
+}
+
+function useTabQueryString({
+ queryString = false,
+ groupId,
+}: Pick) {
+ const history = useHistory();
+ const key = getQueryStringKey({queryString, groupId});
+ const value = useQueryStringValue(key);
+
+ const setValue = useCallback(
+ (newValue: string) => {
+ if (!key) {
+ return; // no-op
+ }
+ const searchParams = new URLSearchParams(history.location.search);
+ searchParams.set(key, newValue);
+ history.replace({...history.location, search: searchParams.toString()});
+ },
+ [key, history],
+ );
+
+ return [value, setValue] as const;
+}
+
+function useTabStorage({groupId}: Pick) {
+ const key = getStorageKey(groupId);
+ const [value, storageSlot] = useStorageSlot(key);
+
+ const setValue = useCallback(
+ (newValue: string) => {
+ if (!key) {
+ return; // no-op
+ }
+ storageSlot.set(newValue);
+ },
+ [key, storageSlot],
+ );
+
+ return [value, setValue] as const;
+}
+
+export function useTabs(props: TabsProps): {
+ selectedValue: string;
+ selectValue: (value: string) => void;
+ tabValues: readonly TabValue[];
+} {
+ const {defaultValue, queryString = false, groupId} = props;
+ const tabValues = useTabValues(props);
+
+ const [selectedValue, setSelectedValue] = useState(() =>
+ getInitialStateValue({defaultValue, tabValues}),
+ );
+
+ const [queryStringValue, setQueryString] = useTabQueryString({
+ queryString,
+ groupId,
+ });
+
+ const [storageValue, setStorageValue] = useTabStorage({
+ groupId,
+ });
+
+ // We sync valid querystring/storage value to state on change + hydration
+ const valueToSync = (() => {
+ const value = queryStringValue ?? storageValue;
+ if (!isValidValue({value, tabValues})) {
+ return null;
+ }
+ return value;
+ })();
+ useEffect(() => {
+ if (valueToSync) {
+ setSelectedValue(valueToSync);
+ }
+ }, [valueToSync]);
+
+ const selectValue = useCallback(
+ (newValue: string) => {
+ if (!isValidValue({value: newValue, tabValues})) {
+ throw new Error(`Can't select invalid tab value=${newValue}`);
+ }
+ setSelectedValue(newValue);
+ setQueryString(newValue);
+ setStorageValue(newValue);
+ },
+ [setQueryString, setStorageValue, tabValues],
+ );
+
+ return {selectedValue, selectValue, tabValues};
+}
diff --git a/packages/docusaurus-theme-live-codeblock/package.json b/packages/docusaurus-theme-live-codeblock/package.json
index c23ad0fcd7bd..fa06ef12c7d1 100644
--- a/packages/docusaurus-theme-live-codeblock/package.json
+++ b/packages/docusaurus-theme-live-codeblock/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/theme-live-codeblock",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docusaurus live code block component.",
"main": "lib/index.js",
"types": "src/theme-live-codeblock.d.ts",
@@ -23,10 +23,10 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/theme-translations": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/theme-translations": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"@philpl/buble": "^0.19.7",
"clsx": "^1.2.1",
"fs-extra": "^10.1.0",
@@ -34,7 +34,7 @@
"tslib": "^2.4.0"
},
"devDependencies": {
- "@docusaurus/types": "2.2.0",
+ "@docusaurus/types": "2.3.0",
"@types/buble": "^0.20.1"
},
"peerDependencies": {
diff --git a/packages/docusaurus-theme-mermaid/package.json b/packages/docusaurus-theme-mermaid/package.json
index 546ac9f78a93..81cf1d45b12e 100644
--- a/packages/docusaurus-theme-mermaid/package.json
+++ b/packages/docusaurus-theme-mermaid/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/theme-mermaid",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Mermaid components for Docusaurus.",
"main": "lib/index.js",
"types": "src/theme-mermaid.d.ts",
@@ -33,18 +33,17 @@
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
},
"dependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/module-type-aliases": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/types": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/types": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"@mdx-js/react": "^1.6.22",
- "mermaid": "^9.1.1",
+ "mermaid": "^9.2.2",
"tslib": "^2.4.0"
},
"devDependencies": {
"@types/mdx-js__react": "^1.5.5",
- "@types/mermaid": "^8.2.9",
"react-test-renderer": "^17.0.2"
},
"peerDependencies": {
diff --git a/packages/docusaurus-theme-mermaid/src/client/index.ts b/packages/docusaurus-theme-mermaid/src/client/index.ts
index e432d6a81a99..f8302085c441 100644
--- a/packages/docusaurus-theme-mermaid/src/client/index.ts
+++ b/packages/docusaurus-theme-mermaid/src/client/index.ts
@@ -7,8 +7,7 @@
import {useMemo} from 'react';
import {useColorMode, useThemeConfig} from '@docusaurus/theme-common';
-import mermaid from 'mermaid';
-import type mermaidAPI from 'mermaid/mermaidAPI';
+import mermaid, {type MermaidConfig} from 'mermaid';
import type {ThemeConfig} from '@docusaurus/theme-mermaid';
// Stable className to allow users to easily target with CSS
@@ -18,7 +17,7 @@ export function useMermaidThemeConfig(): ThemeConfig['mermaid'] {
return (useThemeConfig() as unknown as ThemeConfig).mermaid;
}
-export function useMermaidConfig(): mermaidAPI.Config {
+export function useMermaidConfig(): MermaidConfig {
const {colorMode} = useColorMode();
const mermaidThemeConfig = useMermaidThemeConfig();
@@ -33,7 +32,7 @@ export function useMermaidConfig(): mermaidAPI.Config {
export function useMermaidSvg(
txt: string,
- mermaidConfigParam?: mermaidAPI.Config,
+ mermaidConfigParam?: MermaidConfig,
): string {
/*
For flexibility, we allow the hook to receive a custom Mermaid config
diff --git a/packages/docusaurus-theme-mermaid/src/validateThemeConfig.ts b/packages/docusaurus-theme-mermaid/src/validateThemeConfig.ts
index c68201f225dd..ceaf3b9ce7cf 100644
--- a/packages/docusaurus-theme-mermaid/src/validateThemeConfig.ts
+++ b/packages/docusaurus-theme-mermaid/src/validateThemeConfig.ts
@@ -7,14 +7,13 @@
import {Joi} from '@docusaurus/utils-validation';
import type {ThemeConfig} from '@docusaurus/theme-mermaid';
-import type mermaidAPI from 'mermaid/mermaidAPI';
import type {ThemeConfigValidationContext} from '@docusaurus/types';
export const DEFAULT_THEME_CONFIG: ThemeConfig = {
mermaid: {
theme: {
- dark: 'dark' as mermaidAPI.Theme,
- light: 'default' as mermaidAPI.Theme,
+ dark: 'dark',
+ light: 'default',
},
options: {},
},
diff --git a/packages/docusaurus-theme-mermaid/tsconfig.client.json b/packages/docusaurus-theme-mermaid/tsconfig.client.json
index 1f0c48f14b25..4f9efe7d34d2 100644
--- a/packages/docusaurus-theme-mermaid/tsconfig.client.json
+++ b/packages/docusaurus-theme-mermaid/tsconfig.client.json
@@ -10,6 +10,6 @@
"module": "esnext",
"target": "esnext"
},
- "include": ["src/theme", "src/*.d.ts"],
+ "include": ["src/client", "src/theme", "src/*.d.ts"],
"exclude": ["**/__tests__/**"]
}
diff --git a/packages/docusaurus-theme-mermaid/tsconfig.json b/packages/docusaurus-theme-mermaid/tsconfig.json
index 7c1bb85ac462..3c8737f51c0d 100644
--- a/packages/docusaurus-theme-mermaid/tsconfig.json
+++ b/packages/docusaurus-theme-mermaid/tsconfig.json
@@ -10,5 +10,5 @@
"outDir": "lib"
},
"include": ["src"],
- "exclude": ["src/theme", "**/__tests__/**"]
+ "exclude": ["src/client", "src/theme", "**/__tests__/**"]
}
diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json
index 025290df626b..3ece9b51bf1f 100644
--- a/packages/docusaurus-theme-search-algolia/package.json
+++ b/packages/docusaurus-theme-search-algolia/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/theme-search-algolia",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Algolia search component for Docusaurus.",
"main": "lib/index.js",
"sideEffects": [
@@ -34,13 +34,13 @@
},
"dependencies": {
"@docsearch/react": "^3.1.1",
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/plugin-content-docs": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/theme-translations": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/plugin-content-docs": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/theme-translations": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"algoliasearch": "^4.13.1",
"algoliasearch-helper": "^3.10.0",
"clsx": "^1.2.1",
@@ -51,7 +51,7 @@
"utility-types": "^3.10.0"
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "2.2.0"
+ "@docusaurus/module-type-aliases": "2.3.0"
},
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
diff --git a/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts b/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts
index 9fc315e1c3ba..7559aef403ba 100644
--- a/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts
+++ b/packages/docusaurus-theme-search-algolia/src/__tests__/validateThemeConfig.test.ts
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
-import {validateThemeConfig, DEFAULT_CONFIG} from '../validateThemeConfig';
+import {DEFAULT_CONFIG, validateThemeConfig} from '../validateThemeConfig';
import type {Joi} from '@docusaurus/utils-validation';
function testValidateThemeConfig(themeConfig: {[key: string]: unknown}) {
@@ -121,6 +121,53 @@ describe('validateThemeConfig', () => {
});
});
+ describe('replaceSearchResultPathname', () => {
+ it('escapes from string', () => {
+ const algolia = {
+ appId: 'BH4D9OD16A',
+ indexName: 'index',
+ apiKey: 'apiKey',
+ replaceSearchResultPathname: {
+ from: '/docs/some-\\special-.[regexp]{chars*}',
+ to: '/abc',
+ },
+ };
+ expect(testValidateThemeConfig({algolia})).toEqual({
+ algolia: {
+ ...DEFAULT_CONFIG,
+ ...algolia,
+ replaceSearchResultPathname: {
+ from: '/docs/some\\x2d\\\\special\\x2d\\.\\[regexp\\]\\{chars\\*\\}',
+ to: '/abc',
+ },
+ },
+ });
+ });
+
+ it('converts from regexp to string', () => {
+ const algolia = {
+ appId: 'BH4D9OD16A',
+ indexName: 'index',
+ apiKey: 'apiKey',
+ replaceSearchResultPathname: {
+ from: /^\/docs\/(?:1\.0|next)/,
+ to: '/abc',
+ },
+ };
+
+ expect(testValidateThemeConfig({algolia})).toEqual({
+ algolia: {
+ ...DEFAULT_CONFIG,
+ ...algolia,
+ replaceSearchResultPathname: {
+ from: '^\\/docs\\/(?:1\\.0|next)',
+ to: '/abc',
+ },
+ },
+ });
+ });
+ });
+
it('searchParameters.facetFilters search config', () => {
const algolia = {
appId: 'BH4D9OD16A',
diff --git a/packages/docusaurus-theme-search-algolia/src/client/index.ts b/packages/docusaurus-theme-search-algolia/src/client/index.ts
index a2b338bf27f4..5050ce6aa057 100644
--- a/packages/docusaurus-theme-search-algolia/src/client/index.ts
+++ b/packages/docusaurus-theme-search-algolia/src/client/index.ts
@@ -5,4 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/
+export {useAlgoliaThemeConfig} from './useAlgoliaThemeConfig';
export {useAlgoliaContextualFacetFilters} from './useAlgoliaContextualFacetFilters';
+export {useSearchResultUrlProcessor} from './useSearchResultUrlProcessor';
diff --git a/packages/docusaurus-theme-search-algolia/src/client/useAlgoliaThemeConfig.ts b/packages/docusaurus-theme-search-algolia/src/client/useAlgoliaThemeConfig.ts
new file mode 100644
index 000000000000..80fe16e34ecb
--- /dev/null
+++ b/packages/docusaurus-theme-search-algolia/src/client/useAlgoliaThemeConfig.ts
@@ -0,0 +1,15 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import type {ThemeConfig} from '@docusaurus/theme-search-algolia';
+
+export function useAlgoliaThemeConfig(): ThemeConfig {
+ const {
+ siteConfig: {themeConfig},
+ } = useDocusaurusContext();
+ return themeConfig as ThemeConfig;
+}
diff --git a/packages/docusaurus-theme-search-algolia/src/client/useSearchResultUrlProcessor.ts b/packages/docusaurus-theme-search-algolia/src/client/useSearchResultUrlProcessor.ts
new file mode 100644
index 000000000000..0414d19f2a42
--- /dev/null
+++ b/packages/docusaurus-theme-search-algolia/src/client/useSearchResultUrlProcessor.ts
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import {useCallback} from 'react';
+import {isRegexpStringMatch} from '@docusaurus/theme-common';
+import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
+import {useAlgoliaThemeConfig} from './useAlgoliaThemeConfig';
+import type {ThemeConfig} from '@docusaurus/theme-search-algolia';
+
+function replacePathname(
+ pathname: string,
+ replaceSearchResultPathname: ThemeConfig['algolia']['replaceSearchResultPathname'],
+): string {
+ return replaceSearchResultPathname
+ ? pathname.replaceAll(
+ new RegExp(replaceSearchResultPathname.from, 'g'),
+ replaceSearchResultPathname.to,
+ )
+ : pathname;
+}
+
+/**
+ * Process the search result url from Algolia to its final form, ready to be
+ * navigated to or used as a link
+ */
+export function useSearchResultUrlProcessor(): (url: string) => string {
+ const {withBaseUrl} = useBaseUrlUtils();
+ const {
+ algolia: {externalUrlRegex, replaceSearchResultPathname},
+ } = useAlgoliaThemeConfig();
+
+ return useCallback(
+ (url: string) => {
+ const parsedURL = new URL(url);
+
+ // Algolia contains an external domain => navigate to URL
+ if (isRegexpStringMatch(externalUrlRegex, parsedURL.href)) {
+ return url;
+ }
+
+ // Otherwise => transform to relative URL for SPA navigation
+ const relativeUrl = `${parsedURL.pathname + parsedURL.hash}`;
+
+ return withBaseUrl(
+ replacePathname(relativeUrl, replaceSearchResultPathname),
+ );
+ },
+ [withBaseUrl, externalUrlRegex, replaceSearchResultPathname],
+ );
+}
diff --git a/packages/docusaurus-theme-search-algolia/src/theme-search-algolia.d.ts b/packages/docusaurus-theme-search-algolia/src/theme-search-algolia.d.ts
index 9cf09fed4d05..a6ce183b5dd7 100644
--- a/packages/docusaurus-theme-search-algolia/src/theme-search-algolia.d.ts
+++ b/packages/docusaurus-theme-search-algolia/src/theme-search-algolia.d.ts
@@ -17,13 +17,23 @@ declare module '@docusaurus/theme-search-algolia' {
indexName: string;
searchParameters: {[key: string]: unknown};
searchPagePath: string | false | null;
+ replaceSearchResultPathname?: {
+ from: string;
+ to: string;
+ };
};
};
export type UserThemeConfig = DeepPartial;
}
declare module '@docusaurus/theme-search-algolia/client' {
+ import type {ThemeConfig} from '@docusaurus/theme-search-algolia';
+
+ export function useAlgoliaThemeConfig(): ThemeConfig;
+
export function useAlgoliaContextualFacetFilters(): [string, string[]];
+
+ export function useSearchResultUrlProcessor(): (url: string) => string;
}
declare module '@theme/SearchPage' {
diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx
index a63d6bc2cbf0..b0456492d481 100644
--- a/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx
+++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchBar/index.tsx
@@ -5,20 +5,23 @@
* LICENSE file in the root directory of this source tree.
*/
-import React, {useState, useRef, useCallback, useMemo} from 'react';
-import {createPortal} from 'react-dom';
-import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
-import {useHistory} from '@docusaurus/router';
-import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
-import Link from '@docusaurus/Link';
+import React, {useCallback, useMemo, useRef, useState} from 'react';
+import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
import Head from '@docusaurus/Head';
+import Link from '@docusaurus/Link';
+import {useHistory} from '@docusaurus/router';
import {isRegexpStringMatch} from '@docusaurus/theme-common';
import {useSearchPage} from '@docusaurus/theme-common/internal';
-import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
-import {useAlgoliaContextualFacetFilters} from '@docusaurus/theme-search-algolia/client';
+import {
+ useAlgoliaContextualFacetFilters,
+ useSearchResultUrlProcessor,
+} from '@docusaurus/theme-search-algolia/client';
import Translate from '@docusaurus/Translate';
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import {createPortal} from 'react-dom';
import translations from '@theme/SearchTranslations';
+import type {AutocompleteState} from '@algolia/autocomplete-core';
import type {
DocSearchModal as DocSearchModalType,
DocSearchModalProps,
@@ -28,7 +31,6 @@ import type {
StoredDocSearchHit,
} from '@docsearch/react/dist/esm/types';
import type {SearchClient} from 'algoliasearch/lite';
-import type {AutocompleteState} from '@algolia/autocomplete-core';
type DocSearchProps = Omit<
DocSearchModalProps,
@@ -88,6 +90,7 @@ function DocSearch({
...props
}: DocSearchProps) {
const {siteMetadata} = useDocusaurusContext();
+ const processSearchResultUrl = useSearchResultUrlProcessor();
const contextualSearchFacetFilters =
useAlgoliaContextualFacetFilters() as FacetFilters;
@@ -107,7 +110,6 @@ function DocSearch({
facetFilters,
};
- const {withBaseUrl} = useBaseUrlUtils();
const history = useHistory();
const searchContainer = useRef(null);
const searchButtonRef = useRef(null);
@@ -172,20 +174,14 @@ function DocSearch({
const transformItems = useRef(
(items) =>
- items.map((item) => {
- // If Algolia contains a external domain, we should navigate without
- // relative URL
- if (isRegexpStringMatch(externalUrlRegex, item.url)) {
- return item;
- }
-
- // We transform the absolute URL into a relative URL.
- const url = new URL(item.url);
- return {
- ...item,
- url: withBaseUrl(`${url.pathname}${url.hash}`),
- };
- }),
+ props.transformItems
+ ? // Custom transformItems
+ props.transformItems(items)
+ : // Default transformItems
+ items.map((item) => ({
+ ...item,
+ url: processSearchResultUrl(item.url),
+ })),
).current;
const resultsFooterComponent: DocSearchProps['resultsFooterComponent'] =
diff --git a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx
index 362c001837d3..c85953a62e40 100644
--- a/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx
+++ b/packages/docusaurus-theme-search-algolia/src/theme/SearchPage/index.tsx
@@ -7,32 +7,34 @@
/* eslint-disable jsx-a11y/no-autofocus */
-import React, {useEffect, useState, useReducer, useRef} from 'react';
+import React, {useEffect, useReducer, useRef, useState} from 'react';
import clsx from 'clsx';
-import algoliaSearch from 'algoliasearch/lite';
import algoliaSearchHelper from 'algoliasearch-helper';
+import algoliaSearch from 'algoliasearch/lite';
+import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
import Head from '@docusaurus/Head';
import Link from '@docusaurus/Link';
-import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
+import {useAllDocsData} from '@docusaurus/plugin-content-docs/client';
import {
HtmlClassNameProvider,
- usePluralForm,
- isRegexpStringMatch,
useEvent,
+ usePluralForm,
} from '@docusaurus/theme-common';
import {
- useTitleFormatter,
useSearchPage,
+ useTitleFormatter,
} from '@docusaurus/theme-common/internal';
-import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
-import {useAllDocsData} from '@docusaurus/plugin-content-docs/client';
import Translate, {translate} from '@docusaurus/Translate';
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import {
+ useAlgoliaThemeConfig,
+ useSearchResultUrlProcessor,
+} from '@docusaurus/theme-search-algolia/client';
import Layout from '@theme/Layout';
import styles from './styles.module.css';
-import type {ThemeConfig} from '@docusaurus/theme-search-algolia';
// Very simple pluralization: probably good enough for now
function useDocumentsFoundPlural() {
@@ -156,12 +158,12 @@ type ResultDispatcher =
function SearchPageContent(): JSX.Element {
const {
- siteConfig: {themeConfig},
i18n: {currentLocale},
} = useDocusaurusContext();
const {
- algolia: {appId, apiKey, indexName, externalUrlRegex},
- } = themeConfig as ThemeConfig;
+ algolia: {appId, apiKey, indexName},
+ } = useAlgoliaThemeConfig();
+ const processSearchResultUrl = useSearchResultUrlProcessor();
const documentsFoundPlural = useDocumentsFoundPlural();
const docsSearchVersionsHelpers = useDocsSearchVersionsHelpers();
@@ -244,16 +246,12 @@ function SearchPageContent(): JSX.Element {
_highlightResult: {hierarchy: {[key: string]: {value: string}}};
_snippetResult: {content?: {value: string}};
}) => {
- const parsedURL = new URL(url);
const titles = Object.keys(hierarchy).map((key) =>
sanitizeValue(hierarchy[key]!.value),
);
-
return {
title: titles.pop()!,
- url: isRegexpStringMatch(externalUrlRegex, parsedURL.href)
- ? parsedURL.href
- : parsedURL.pathname + parsedURL.hash,
+ url: processSearchResultUrl(url),
summary: snippet.content
? `${sanitizeValue(snippet.content.value)}...`
: '',
diff --git a/packages/docusaurus-theme-search-algolia/src/validateThemeConfig.ts b/packages/docusaurus-theme-search-algolia/src/validateThemeConfig.ts
index a2a2ccd7869e..2e1061d86429 100644
--- a/packages/docusaurus-theme-search-algolia/src/validateThemeConfig.ts
+++ b/packages/docusaurus-theme-search-algolia/src/validateThemeConfig.ts
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
+import {escapeRegexp} from '@docusaurus/utils';
import {Joi} from '@docusaurus/utils-validation';
import type {
ThemeConfig,
@@ -39,6 +40,19 @@ export const Schema = Joi.object({
.try(Joi.boolean().invalid(true), Joi.string())
.allow(null)
.default(DEFAULT_CONFIG.searchPagePath),
+ replaceSearchResultPathname: Joi.object({
+ from: Joi.custom((from) => {
+ if (typeof from === 'string') {
+ return escapeRegexp(from);
+ } else if (from instanceof RegExp) {
+ return from.source;
+ }
+ throw new Error(
+ `it should be a RegExp or a string, but received ${from}`,
+ );
+ }).required(),
+ to: Joi.string().required(),
+ }).optional(),
})
.label('themeConfig.algolia')
.required()
diff --git a/packages/docusaurus-theme-translations/locales/ar/theme-common.json b/packages/docusaurus-theme-translations/locales/ar/theme-common.json
index af8ccb27bb4c..8c9d89a47651 100644
--- a/packages/docusaurus-theme-translations/locales/ar/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/ar/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "تبديل فئة الشريط الجاني القابل للاغلاق '{label}'",
"theme.ErrorPageContent.title": "هذه الصفحة لا تستجيب.",
"theme.ErrorPageContent.tryAgain": "المحاولة مجددا",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "لم نتمكن من العثور على ما كنت تبحث عنه.",
"theme.NotFound.p2": "يرجى الاتصال بمالك الموقع الذي ربطك بعنوان URL الأصلي وإخباره بأن الارتباط الخاص به معطل.",
"theme.NotFound.title": "الصفحة غير موجودة",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "الوضع الداكن",
"theme.colorToggle.ariaLabel.mode.light": "الوضع الفاتح",
"theme.common.editThisPage": "تعديل هذه الصفحة",
- "theme.common.headingLinkTitle": "ارتباط مباشر بالعنوان",
+ "theme.common.headingLinkTitle": "ارتباط مباشر بالعنوان {heading}",
"theme.common.skipToMainContent": "انتقل إلى المحتوى الرئيسي",
"theme.docs.DocCard.categoryDescription": "{count} مواد",
"theme.docs.breadcrumbs.home": "الرئيسية",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "طي الشريط الجانبي",
"theme.docs.sidebar.expandButtonAriaLabel": "توسيع الشريط الجانبي",
"theme.docs.sidebar.expandButtonTitle": "توسيع الشريط الجانبي",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} مستند موسوم بـ \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "مستند موسوم واحد|{count} مستندات موسومة",
diff --git a/packages/docusaurus-theme-translations/locales/base/theme-common.json b/packages/docusaurus-theme-translations/locales/base/theme-common.json
index 695c5fff430e..f8e0943fbd3f 100644
--- a/packages/docusaurus-theme-translations/locales/base/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/base/theme-common.json
@@ -16,7 +16,9 @@
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.title___DESCRIPTION": "The title of the fallback page when the page crashed",
"theme.ErrorPageContent.tryAgain": "Try again",
- "theme.ErrorPageContent.tryAgain___DESCRIPTION": "The label of the button to try again when the page crashed",
+ "theme.ErrorPageContent.tryAgain___DESCRIPTION": "The label of the button to try again rendering when the React error boundary captures an error",
+ "theme.NavBar.navAriaLabel": "Main",
+ "theme.NavBar.navAriaLabel___DESCRIPTION": "The ARIA label for the main navigation",
"theme.NotFound.p1": "We could not find what you were looking for.",
"theme.NotFound.p1___DESCRIPTION": "The first paragraph of the 404 page",
"theme.NotFound.p2": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.",
@@ -71,7 +73,7 @@
"theme.colorToggle.ariaLabel.mode.light___DESCRIPTION": "The name for the light color mode",
"theme.common.editThisPage": "Edit this page",
"theme.common.editThisPage___DESCRIPTION": "The link label to edit the current page",
- "theme.common.headingLinkTitle": "Direct link to heading",
+ "theme.common.headingLinkTitle": "Direct link to {heading}",
"theme.common.headingLinkTitle___DESCRIPTION": "Title for link to heading",
"theme.common.skipToMainContent": "Skip to main content",
"theme.common.skipToMainContent___DESCRIPTION": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",
@@ -97,6 +99,8 @@
"theme.docs.sidebar.expandButtonAriaLabel___DESCRIPTION": "The ARIA label and title attribute for expand button of doc sidebar",
"theme.docs.sidebar.expandButtonTitle": "Expand sidebar",
"theme.docs.sidebar.expandButtonTitle___DESCRIPTION": "The ARIA label and title attribute for expand button of doc sidebar",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
+ "theme.docs.sidebar.navAriaLabel___DESCRIPTION": "The ARIA label for the sidebar navigation",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel___DESCRIPTION": "The ARIA label for hamburger menu button of mobile navigation",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
diff --git a/packages/docusaurus-theme-translations/locales/bn/theme-common.json b/packages/docusaurus-theme-translations/locales/bn/theme-common.json
index f77d613d1788..5592dec6b307 100644
--- a/packages/docusaurus-theme-translations/locales/bn/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/bn/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "আপনি যা খুঁজছিলেন তা আমরা খুঁজে পাইনি।",
"theme.NotFound.p2": "দয়া করে সাইটের মালিকের সাথে যোগাযোগ করুন যা আপনাকে মূল URL এর সাথে যুক্ত করেছে এবং তাদের লিঙ্কটি ভাঙ্গা রয়েছে তা তাদের জানান।",
"theme.NotFound.title": "পেজটি খুঁজে পাওয়া যায়নি",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "এই পেজটি এডিট করুন",
- "theme.common.headingLinkTitle": "হেডিং এর সঙ্গে সরাসরি লিংকড",
+ "theme.common.headingLinkTitle": "{heading} এর সঙ্গে সরাসরি লিংকড",
"theme.common.skipToMainContent": "স্কিপ করে মূল কন্টেন্ট এ যান",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "সাইডবারটি সঙ্কুচিত করুন",
"theme.docs.sidebar.expandButtonAriaLabel": "সাইডবারটি প্রসারিত করুন",
"theme.docs.sidebar.expandButtonTitle": "সাইডবারটি প্রসারিত করুন",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/cs/theme-common.json b/packages/docusaurus-theme-translations/locales/cs/theme-common.json
index c5e85314faad..49b04df3d540 100644
--- a/packages/docusaurus-theme-translations/locales/cs/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/cs/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Nepodařilo se nám najít co jste hledal(a).",
"theme.NotFound.p2": "Kontaktujte prosím vlastníka webu, který vás odkázal na původní URL a upozorněte ho, že jejich odkaz nefunguje.",
"theme.NotFound.title": "Stránka nenalezena",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Upravit tuto stránku",
- "theme.common.headingLinkTitle": "Přímý odkaz na nadpis",
+ "theme.common.headingLinkTitle": "Přímý odkaz na {heading}",
"theme.common.skipToMainContent": "Přeskočit na hlavní obsah",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Zavřít postranní lištu",
"theme.docs.sidebar.expandButtonAriaLabel": "Otevřít postranní lištu",
"theme.docs.sidebar.expandButtonTitle": "Otevřít postranní lištu",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/da/theme-common.json b/packages/docusaurus-theme-translations/locales/da/theme-common.json
index adbe3e6eace9..a42dcc830194 100644
--- a/packages/docusaurus-theme-translations/locales/da/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/da/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Vi kunne ikke finde det, du søgte.",
"theme.NotFound.p2": "Venligst kontakt ejeren til webstedet, som førte dig frem denne URL, og informer dem om at linket ikke virker.",
"theme.NotFound.title": "Siden blev ikke fundet",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Rediger denne side",
- "theme.common.headingLinkTitle": "Direkte link til overskrift",
+ "theme.common.headingLinkTitle": "Direkte link til {heading}",
"theme.common.skipToMainContent": "Hop til hovedindhold",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Sammenlæg sidenavigation",
"theme.docs.sidebar.expandButtonAriaLabel": "Udvid sidenavigation",
"theme.docs.sidebar.expandButtonTitle": "Udvid sidenavigation",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/de/theme-common.json b/packages/docusaurus-theme-translations/locales/de/theme-common.json
index ada97df4c8af..87645c6cdbf4 100644
--- a/packages/docusaurus-theme-translations/locales/de/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/de/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Umschalten der Seitenleiste mit einklappbarer Kategorie '{label}'",
"theme.ErrorPageContent.title": "Die Seite ist abgestürzt.",
"theme.ErrorPageContent.tryAgain": "Nochmal versuchen",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Wir konnten nicht finden, wonach Sie gesucht haben.",
"theme.NotFound.p2": "Bitte kontaktieren Sie den Besitzer der Seite, die Sie mit der ursprünglichen URL verlinkt hat, und teilen Sie ihm mit, dass der Link nicht mehr funktioniert.",
"theme.NotFound.title": "Seite nicht gefunden",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dunkler Modus",
"theme.colorToggle.ariaLabel.mode.light": "heller Modus",
"theme.common.editThisPage": "Diese Seite bearbeiten",
- "theme.common.headingLinkTitle": "Direkter Link zur Überschrift",
+ "theme.common.headingLinkTitle": "Direkter Link zur {heading}",
"theme.common.skipToMainContent": "Zum Hauptinhalt springen",
"theme.docs.DocCard.categoryDescription": "{count} Einträge",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Seitenleiste einklappen",
"theme.docs.sidebar.expandButtonAriaLabel": "Seitenleiste ausklappen",
"theme.docs.sidebar.expandButtonTitle": "Seitenleiste ausklappen",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} mit \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Ein doc getaggt|{count} docs getaggt",
diff --git a/packages/docusaurus-theme-translations/locales/es/theme-common.json b/packages/docusaurus-theme-translations/locales/es/theme-common.json
index a8662c60ec2a..5dd0182e975c 100644
--- a/packages/docusaurus-theme-translations/locales/es/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/es/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "No pudimos encontrar lo que buscaba.",
"theme.NotFound.p2": "Comuníquese con el dueño del sitio que lo vinculó a la URL original y hágale saber que su vínculo está roto.",
"theme.NotFound.title": "Página No Encontrada",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Editar esta página",
- "theme.common.headingLinkTitle": "Enlace directo al encabezado",
+ "theme.common.headingLinkTitle": "Enlace directo al {heading}",
"theme.common.skipToMainContent": "Saltar al contenido principal",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Colapsar barra lateral",
"theme.docs.sidebar.expandButtonAriaLabel": "Expandir barra lateral",
"theme.docs.sidebar.expandButtonTitle": "Expandir barra lateral",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} con \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Un documento etiquetado|{count} documentos etiquetados",
diff --git a/packages/docusaurus-theme-translations/locales/fa/theme-common.json b/packages/docusaurus-theme-translations/locales/fa/theme-common.json
index 38aa636cd480..65852f81c2b9 100644
--- a/packages/docusaurus-theme-translations/locales/fa/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/fa/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "دستهبندی برچسب '{label}' در نوار کناری را تغییر دهید ",
"theme.ErrorPageContent.title": "بارگذاری صفحه با خطا روبرو شد.",
"theme.ErrorPageContent.tryAgain": "تلاش مجدد",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "صفحهای که دنبال آن بودید پیدا نشد.",
"theme.NotFound.p2": "لطفا با صاحب وبسایت تماس بگیرید و ایشان را از مشکل پیش آمده مطلع کنید.",
"theme.NotFound.title": "صفحه ای که دنبال آن بودید پیدا نشد.",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "حالت تیره",
"theme.colorToggle.ariaLabel.mode.light": "حالت روشن",
"theme.common.editThisPage": "ویرایش مطالب این صفحه",
- "theme.common.headingLinkTitle": "لینک مستقیم به عنوان",
+ "theme.common.headingLinkTitle": "لینک مستقیم به {heading}",
"theme.common.skipToMainContent": "پرش به مطلب اصلی",
"theme.docs.DocCard.categoryDescription": "{count} مورد",
"theme.docs.breadcrumbs.home": "صفحه اصلی",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "بستن نوار کناری",
"theme.docs.sidebar.expandButtonAriaLabel": "باز کردن نوار کناری",
"theme.docs.sidebar.expandButtonTitle": "باز کردن نوار کناری",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} با \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "یک مطلب برچسب شده|{count} مطلب برچسب شده",
diff --git a/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json
index fac59483e71e..e9108bc9dafa 100644
--- a/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json
+++ b/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json
@@ -1,29 +1,29 @@
{
"theme.SearchBar.label": "جستجو",
"theme.SearchBar.seeAll": "نمایش {count} نتیجه",
- "theme.SearchModal.errorScreen.helpText": "You might want to check your network connection.",
- "theme.SearchModal.errorScreen.titleText": "Unable to fetch results",
- "theme.SearchModal.footer.closeKeyAriaLabel": "Escape key",
- "theme.SearchModal.footer.closeText": "to close",
- "theme.SearchModal.footer.navigateDownKeyAriaLabel": "Arrow down",
- "theme.SearchModal.footer.navigateText": "to navigate",
- "theme.SearchModal.footer.navigateUpKeyAriaLabel": "Arrow up",
- "theme.SearchModal.footer.searchByText": "Search by",
- "theme.SearchModal.footer.selectKeyAriaLabel": "Enter key",
- "theme.SearchModal.footer.selectText": "to select",
- "theme.SearchModal.noResultsScreen.noResultsText": "No results for",
- "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Let us know.",
- "theme.SearchModal.noResultsScreen.reportMissingResultsText": "Believe this query should return results?",
- "theme.SearchModal.noResultsScreen.suggestedQueryText": "Try searching for",
- "theme.SearchModal.placeholder": "Search docs",
- "theme.SearchModal.searchBox.cancelButtonText": "Cancel",
- "theme.SearchModal.searchBox.resetButtonTitle": "Clear the query",
- "theme.SearchModal.startScreen.favoriteSearchesTitle": "Favorite",
- "theme.SearchModal.startScreen.noRecentSearchesText": "No recent searches",
- "theme.SearchModal.startScreen.recentSearchesTitle": "Recent",
- "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Remove this search from favorites",
- "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Remove this search from history",
- "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Save this search",
+ "theme.SearchModal.errorScreen.helpText": "لطفا اتصال شبکه خود را بررسی کنید.",
+ "theme.SearchModal.errorScreen.titleText": "دریافت نتایج ممکن نیست",
+ "theme.SearchModal.footer.closeKeyAriaLabel": "کلید Escape",
+ "theme.SearchModal.footer.closeText": "بستن",
+ "theme.SearchModal.footer.navigateDownKeyAriaLabel": "کلید پایین",
+ "theme.SearchModal.footer.navigateText": "پیمایش",
+ "theme.SearchModal.footer.navigateUpKeyAriaLabel": "کلید بالا",
+ "theme.SearchModal.footer.searchByText": "جستجو برای",
+ "theme.SearchModal.footer.selectKeyAriaLabel": "کلید اینتر",
+ "theme.SearchModal.footer.selectText": "انتخاب",
+ "theme.SearchModal.noResultsScreen.noResultsText": "هیچ نتیجه ای برای",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "با ما در میان بگذارید.",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsText": "آیا اطمینان دارید این جستجو باید نتیجه ای داشته باشد؟",
+ "theme.SearchModal.noResultsScreen.suggestedQueryText": "جستجو پیشنهادی برای",
+ "theme.SearchModal.placeholder": "جستجوی مستندات",
+ "theme.SearchModal.searchBox.cancelButtonText": "کنسل",
+ "theme.SearchModal.searchBox.resetButtonTitle": "پاک کردن جستجو",
+ "theme.SearchModal.startScreen.favoriteSearchesTitle": "برگزیده",
+ "theme.SearchModal.startScreen.noRecentSearchesText": "جستجوی اخیر مشاهده نشد",
+ "theme.SearchModal.startScreen.recentSearchesTitle": "اخیرا",
+ "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "این جستجو از برگزیده ها پاک شود",
+ "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "این جستجو از تاریخچه پاک شود",
+ "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "ذخیره این جستجو",
"theme.SearchPage.algoliaLabel": "جستجو با Algolia",
"theme.SearchPage.documentsFound.plurals": "یک مورد پیدا شد|{count} مورد پیدا شد",
"theme.SearchPage.emptyResultsTitle": "جستجو در متن",
diff --git a/packages/docusaurus-theme-translations/locales/fil/theme-common.json b/packages/docusaurus-theme-translations/locales/fil/theme-common.json
index 11aa9d25f4f6..7af9ac9d4ae7 100644
--- a/packages/docusaurus-theme-translations/locales/fil/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/fil/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Hindi namin mahanap ang iyong hinananap.",
"theme.NotFound.p2": "Mangyaring makipag-ugnayan sa may-ari ng site na nag-link sa iyo sa orihinal na URL at sabihin sa kanila na ang kanilang link ay putol.",
"theme.NotFound.title": "Hindi Nahanap ang Pahina",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "I-edit ang page",
- "theme.common.headingLinkTitle": "Direktang link patungo sa heading",
+ "theme.common.headingLinkTitle": "Direktang link patungo sa {heading}",
"theme.common.skipToMainContent": "Lumaktaw patungo sa pangunahing content",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Itupî ang sidebar",
"theme.docs.sidebar.expandButtonAriaLabel": "Palakihin ang sidebar",
"theme.docs.sidebar.expandButtonTitle": "Palakihin ang sidebar",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/fr/theme-common.json b/packages/docusaurus-theme-translations/locales/fr/theme-common.json
index a4dceac65713..58e152862048 100644
--- a/packages/docusaurus-theme-translations/locales/fr/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/fr/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Plier/Déplier la catégorie '{label}' de la barre latérale",
"theme.ErrorPageContent.title": "Cette page a planté.",
"theme.ErrorPageContent.tryAgain": "Réessayer",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Nous n'avons pas trouvé ce que vous recherchez.",
"theme.NotFound.p2": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et leur faire savoir que leur lien est cassé.",
"theme.NotFound.title": "Page introuvable",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "mode sombre",
"theme.colorToggle.ariaLabel.mode.light": "mode clair",
"theme.common.editThisPage": "Éditer cette page",
- "theme.common.headingLinkTitle": "Lien direct vers le titre",
+ "theme.common.headingLinkTitle": "Lien direct vers {heading}",
"theme.common.skipToMainContent": "Aller au contenu principal",
"theme.docs.DocCard.categoryDescription": "{count} éléments",
"theme.docs.breadcrumbs.home": "Page d'accueil",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Réduire le menu latéral",
"theme.docs.sidebar.expandButtonAriaLabel": "Déplier le menu latéral",
"theme.docs.sidebar.expandButtonTitle": "Déplier le menu latéral",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Ouvrir/fermer la barre de navigation",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} avec \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Un document tagué|{count} documents tagués",
diff --git a/packages/docusaurus-theme-translations/locales/he/theme-common.json b/packages/docusaurus-theme-translations/locales/he/theme-common.json
index 4082c802805b..8f986d566433 100644
--- a/packages/docusaurus-theme-translations/locales/he/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/he/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "אנחנו לא מוצאים את מה שאתה מנסה לחפש.",
"theme.NotFound.p2": "הקישור אינו תקין, אנא פנה למנהל האתר ממנו קיבלת קישור זה.",
"theme.NotFound.title": "דף לא נמצא",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "ערוך דף זה",
- "theme.common.headingLinkTitle": "קישור ישיר לכותרת",
+ "theme.common.headingLinkTitle": "קישור ישיר אל {heading}",
"theme.common.skipToMainContent": "דלג לתוכן הראשי",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "סגור",
"theme.docs.sidebar.expandButtonAriaLabel": "פתח",
"theme.docs.sidebar.expandButtonTitle": "פתח",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/hi/theme-common.json b/packages/docusaurus-theme-translations/locales/hi/theme-common.json
index 3113ac239e2b..8f1a68f7179b 100644
--- a/packages/docusaurus-theme-translations/locales/hi/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/hi/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "हमें वह नहीं मिला, जिसकी आपको तलाश थी।",
"theme.NotFound.p2": "कृपया उस साइट के मालिक से संपर्क करें जिसने आपको मूल URL से जोड़ा है और उन्हें बताएं कि उनका लिंक टूट गया है।",
"theme.NotFound.title": "पेज नहीं मिला",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "इस पेज को बदलें",
- "theme.common.headingLinkTitle": "शीर्षक का सीधा लिंक",
+ "theme.common.headingLinkTitle": "{heading} का सीधा लिंक",
"theme.common.skipToMainContent": "मुख्य कंटेंट तक स्किप करें",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "साइडबार बंद करें",
"theme.docs.sidebar.expandButtonAriaLabel": "साइडबार खोलें",
"theme.docs.sidebar.expandButtonTitle": "साइडबार खोलें",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/it/theme-common.json b/packages/docusaurus-theme-translations/locales/it/theme-common.json
index f3ca7df138b1..cd1c9f9678b6 100644
--- a/packages/docusaurus-theme-translations/locales/it/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/it/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Attiva/disattiva la categoria '{label}' della barra laterale collassabile",
"theme.ErrorPageContent.title": "Questa pagina è andata in crash.",
"theme.ErrorPageContent.tryAgain": "Prova di nuovo",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Non siamo riusciti a trovare quello che stavi cercando.",
"theme.NotFound.p2": "Contatta il proprietario del sito che ti ha collegato all'URL originale e fagli sapere che il loro collegamento è interrotto.",
"theme.NotFound.title": "Pagina non trovata",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Modifica questa pagina",
- "theme.common.headingLinkTitle": "Link diretto all'intestazione",
+ "theme.common.headingLinkTitle": "Link diretto a {heading}",
"theme.common.skipToMainContent": "Passa al contenuto principale",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Collassa la barra laterale",
"theme.docs.sidebar.expandButtonAriaLabel": "Espandi la barra laterale",
"theme.docs.sidebar.expandButtonTitle": "Espandi la barra laterale",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} con \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Un documento etichettato|{count} documenti etichettati",
diff --git a/packages/docusaurus-theme-translations/locales/ja/theme-common.json b/packages/docusaurus-theme-translations/locales/ja/theme-common.json
index 4ae84260dc9e..d1926fb4678c 100644
--- a/packages/docusaurus-theme-translations/locales/ja/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/ja/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "サイドバーのカテゴリー「{label}」を開く・閉じる",
"theme.ErrorPageContent.title": "エラーが発生しました",
"theme.ErrorPageContent.tryAgain": "もう一度試してください",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "お探しのページが見つかりませんでした",
"theme.NotFound.p2": "このページにリンクしているサイトの所有者にリンクが壊れていることを伝えてください",
"theme.NotFound.title": "ページが見つかりません",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "ダークモード",
"theme.colorToggle.ariaLabel.mode.light": "ライトモード",
"theme.common.editThisPage": "このページを編集",
- "theme.common.headingLinkTitle": "この見出しへのリンク",
+ "theme.common.headingLinkTitle": "{heading} への直接リンク",
"theme.common.skipToMainContent": "メインコンテンツまでスキップ",
"theme.docs.DocCard.categoryDescription": "{count}項目",
"theme.docs.breadcrumbs.home": "ホームページ",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "サイドバーを隠す",
"theme.docs.sidebar.expandButtonAriaLabel": "サイドバーを開く",
"theme.docs.sidebar.expandButtonTitle": "サイドバーを開く",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "「{tagName}」タグのついた{nDocsTagged}",
"theme.docs.tagDocListPageTitle.nDocsTagged": "{count}記事",
diff --git a/packages/docusaurus-theme-translations/locales/ko/theme-common.json b/packages/docusaurus-theme-translations/locales/ko/theme-common.json
index 18567774be7f..3adbe4fe9c66 100644
--- a/packages/docusaurus-theme-translations/locales/ko/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/ko/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "접을 수 있는 사이드바 분류 '{label}' 접기(펼치기)",
"theme.ErrorPageContent.title": "페이지에 오류가 발생하였습니다.",
"theme.ErrorPageContent.tryAgain": "다시 시도해 보세요",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "원하는 페이지를 찾을 수 없습니다.",
"theme.NotFound.p2": "사이트 관리자에게 링크가 깨진 것을 알려주세요.",
"theme.NotFound.title": "페이지를 찾을 수 없습니다.",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "어두운 모드",
"theme.colorToggle.ariaLabel.mode.light": "밝은 모드",
"theme.common.editThisPage": "페이지 편집",
- "theme.common.headingLinkTitle": "제목으로 바로 가기",
+ "theme.common.headingLinkTitle": "{heading}에 대한 직접 링크",
"theme.common.skipToMainContent": "본문으로 건너뛰기",
"theme.docs.DocCard.categoryDescription": "{count} 항목",
"theme.docs.breadcrumbs.home": "홈",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "사이드바 숨기기",
"theme.docs.sidebar.expandButtonAriaLabel": "사이드바 열기",
"theme.docs.sidebar.expandButtonTitle": "사이드바 열기",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} \"{tagName}\" 태그에 분류되었습니다",
"theme.docs.tagDocListPageTitle.nDocsTagged": "{count}개 문서가",
diff --git a/packages/docusaurus-theme-translations/locales/nl/theme-common.json b/packages/docusaurus-theme-translations/locales/nl/theme-common.json
index 9970dcb85cbd..048d9955c72d 100644
--- a/packages/docusaurus-theme-translations/locales/nl/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/nl/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Klap de opvouwbare zijbalkcategorie '{label}' in of uit",
"theme.ErrorPageContent.title": "Deze pagina is gecrasht.",
"theme.ErrorPageContent.tryAgain": "Probeer opnieuw",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "We kunnen niet vinden waar je naar op zoek bent.",
"theme.NotFound.p2": "Neem contact op met de eigenaar van de website die naar de originele URL heeft geleid en laat weten dat de link niet meer werkt.",
"theme.NotFound.title": "Pagina niet gevonden",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "donkere modus",
"theme.colorToggle.ariaLabel.mode.light": "lichte modus",
"theme.common.editThisPage": "Bewerk deze pagina",
- "theme.common.headingLinkTitle": "Direct link naar de titel",
+ "theme.common.headingLinkTitle": "Direct link naar {heading}",
"theme.common.skipToMainContent": "Ga naar hoofdinhoud",
"theme.docs.DocCard.categoryDescription": "{count} artikelen",
"theme.docs.breadcrumbs.home": "Homepagina",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Zijbalk inklappen",
"theme.docs.sidebar.expandButtonAriaLabel": "Zijbalk uitklappen",
"theme.docs.sidebar.expandButtonTitle": "Zijbalk uitklappen",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} met \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Een artikel getagd|{count} artikelen getagd",
diff --git a/packages/docusaurus-theme-translations/locales/pl/theme-common.json b/packages/docusaurus-theme-translations/locales/pl/theme-common.json
index 9cd009cd3e18..7cb0434b3ee2 100644
--- a/packages/docusaurus-theme-translations/locales/pl/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/pl/theme-common.json
@@ -4,19 +4,20 @@
"theme.CodeBlock.copied": "Skopiowano!",
"theme.CodeBlock.copy": "Kopiuj",
"theme.CodeBlock.copyButtonAriaLabel": "Kopiuj do schowka",
- "theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
+ "theme.CodeBlock.wordWrapToggle": "Przełącz zawijanie słów",
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Przełącz zwijalną kategorię panelu bocznego '{label}'",
"theme.ErrorPageContent.title": "Ta strona uległa awarii.",
"theme.ErrorPageContent.tryAgain": "Spróbuj ponownie",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Nie mogliśmy znaleźć strony której szukasz.",
"theme.NotFound.p2": "Proszę skontaktuj się z właścielem strony, z której link doprowadził Cię tutaj i poinformuj go, że link jest nieprawidłowy.",
"theme.NotFound.title": "Strona nie została znaleziona",
"theme.TOCCollapsible.toggleButtonLabel": "Na tej stronie",
- "theme.admonition.caution": "caution",
- "theme.admonition.danger": "danger",
- "theme.admonition.info": "info",
- "theme.admonition.note": "note",
- "theme.admonition.tip": "tip",
+ "theme.admonition.caution": "uwaga",
+ "theme.admonition.danger": "ważne",
+ "theme.admonition.info": "informacja",
+ "theme.admonition.note": "notatka",
+ "theme.admonition.tip": "wskazówka",
"theme.blog.archive.description": "Archiwum",
"theme.blog.archive.title": "Archiwum",
"theme.blog.paginator.navAriaLabel": "Nawigacja na stronie listy wpisów na blogu",
@@ -35,20 +36,21 @@
"theme.colorToggle.ariaLabel.mode.dark": "ciemny motyw",
"theme.colorToggle.ariaLabel.mode.light": "jasny motyw",
"theme.common.editThisPage": "Edytuj tę stronę",
- "theme.common.headingLinkTitle": "Bezpośredni link do nagłówka",
+ "theme.common.headingLinkTitle": "Bezpośredni link do {heading}",
"theme.common.skipToMainContent": "Przejdź do głównej zawartości",
"theme.docs.DocCard.categoryDescription": "{count} elementów",
- "theme.docs.breadcrumbs.home": "Home page",
- "theme.docs.breadcrumbs.navAriaLabel": "Breadcrumbs",
+ "theme.docs.breadcrumbs.home": "Strona główna",
+ "theme.docs.breadcrumbs.navAriaLabel": "Pasek nawigacji",
"theme.docs.paginator.navAriaLabel": "Nawigacja na stronie dokumentacji",
"theme.docs.paginator.next": "Następna strona",
"theme.docs.paginator.previous": "Poprzednia strona",
- "theme.docs.sidebar.closeSidebarButtonAriaLabel": "Close navigation bar",
+ "theme.docs.sidebar.closeSidebarButtonAriaLabel": "Zamknij panel nawigacji",
"theme.docs.sidebar.collapseButtonAriaLabel": "Zwiń boczny panel",
"theme.docs.sidebar.collapseButtonTitle": "Zwiń boczny panel",
"theme.docs.sidebar.expandButtonAriaLabel": "Rozszerz boczny panel",
"theme.docs.sidebar.expandButtonTitle": "Rozszerz boczny panel",
- "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
+ "theme.docs.sidebar.navAriaLabel": "Panel boczny dokumentów",
+ "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Przełączanie panelu nawigacyjnego",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Jedna strona dokumentacji otagowana|{count} strony dokumentacji otagowane|{count} stron dokumentacji otagowanych",
"theme.docs.versionBadge.label": "Wersja: {versionLabel}",
diff --git a/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json
index e12024e2a974..bc4ab9d5f6cf 100644
--- a/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json
+++ b/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json
@@ -1,29 +1,29 @@
{
"theme.SearchBar.label": "Szukaj",
"theme.SearchBar.seeAll": "Wyświetl wszystkie {count} wyników",
- "theme.SearchModal.errorScreen.helpText": "You might want to check your network connection.",
- "theme.SearchModal.errorScreen.titleText": "Unable to fetch results",
- "theme.SearchModal.footer.closeKeyAriaLabel": "Escape key",
- "theme.SearchModal.footer.closeText": "to close",
- "theme.SearchModal.footer.navigateDownKeyAriaLabel": "Arrow down",
- "theme.SearchModal.footer.navigateText": "to navigate",
- "theme.SearchModal.footer.navigateUpKeyAriaLabel": "Arrow up",
- "theme.SearchModal.footer.searchByText": "Search by",
- "theme.SearchModal.footer.selectKeyAriaLabel": "Enter key",
- "theme.SearchModal.footer.selectText": "to select",
- "theme.SearchModal.noResultsScreen.noResultsText": "No results for",
- "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Let us know.",
- "theme.SearchModal.noResultsScreen.reportMissingResultsText": "Believe this query should return results?",
- "theme.SearchModal.noResultsScreen.suggestedQueryText": "Try searching for",
- "theme.SearchModal.placeholder": "Search docs",
- "theme.SearchModal.searchBox.cancelButtonText": "Cancel",
- "theme.SearchModal.searchBox.resetButtonTitle": "Clear the query",
- "theme.SearchModal.startScreen.favoriteSearchesTitle": "Favorite",
- "theme.SearchModal.startScreen.noRecentSearchesText": "No recent searches",
- "theme.SearchModal.startScreen.recentSearchesTitle": "Recent",
- "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Remove this search from favorites",
- "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Remove this search from history",
- "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Save this search",
+ "theme.SearchModal.errorScreen.helpText": "Sprawdź swoje połączenie sieciowe.",
+ "theme.SearchModal.errorScreen.titleText": "Nie można pobrać wyników",
+ "theme.SearchModal.footer.closeKeyAriaLabel": "Klawisz Escape",
+ "theme.SearchModal.footer.closeText": "aby zamknąć",
+ "theme.SearchModal.footer.navigateDownKeyAriaLabel": "Strzałka w dół",
+ "theme.SearchModal.footer.navigateText": "aby przejść",
+ "theme.SearchModal.footer.navigateUpKeyAriaLabel": "Strzałka w górę",
+ "theme.SearchModal.footer.searchByText": "Szukaj według",
+ "theme.SearchModal.footer.selectKeyAriaLabel": "Klawisz Enter",
+ "theme.SearchModal.footer.selectText": "aby wybrać",
+ "theme.SearchModal.noResultsScreen.noResultsText": "Brak wyników dla",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Daj nam znać.",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsText": "Wydaje Ci się, że to zapytanie powinno zwrócić wyniki?",
+ "theme.SearchModal.noResultsScreen.suggestedQueryText": "Spróbuj poszukać",
+ "theme.SearchModal.placeholder": "Wyszukaj dokumenty",
+ "theme.SearchModal.searchBox.cancelButtonText": "Anuluj",
+ "theme.SearchModal.searchBox.resetButtonTitle": "Wyczyść zapytanie",
+ "theme.SearchModal.startScreen.favoriteSearchesTitle": "Ulubione",
+ "theme.SearchModal.startScreen.noRecentSearchesText": "Brak ostatnich wyszukiwań",
+ "theme.SearchModal.startScreen.recentSearchesTitle": "Ostatnie wyszukiwania",
+ "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Usuń to wyszukiwanie z ulubionych",
+ "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Usuń to wyszukiwanie z historii",
+ "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Zapisz to wyszukiwanie",
"theme.SearchPage.algoliaLabel": "Dostawca rozwiązania Algolia",
"theme.SearchPage.documentsFound.plurals": "Jeden dokument znaleziony|{count} dokumenty znalezione|{count} dokumentów znalezionych",
"theme.SearchPage.emptyResultsTitle": "Wyszukaj w dokumentacji",
diff --git a/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json b/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json
index 65ad133049ea..0d54b9a52d9a 100644
--- a/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Não foi possível encontrar o que você está procurando.",
"theme.NotFound.p2": "Entre em contato com o proprietário do site que lhe trouxe para cá e lhe informe que o link está quebrado.",
"theme.NotFound.title": "Página não encontrada",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Editar essa página",
- "theme.common.headingLinkTitle": "Link direto para o título",
+ "theme.common.headingLinkTitle": "Link direto para {heading}",
"theme.common.skipToMainContent": "Pular para o conteúdo principal",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Fechar painel lateral",
"theme.docs.sidebar.expandButtonAriaLabel": "Expandir painel lateral",
"theme.docs.sidebar.expandButtonTitle": "Expandir painel lateral",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} com \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Um documento selecionado|{count} documentos selecionados",
diff --git a/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json b/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json
index 81a2e2fc142d..55be758b6b49 100644
--- a/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Não foi possível encontrar o que procura.",
"theme.NotFound.p2": "Por favor, contacte o proprietário do site que o trouxe aqui e informe-lhe que o link está partido.",
"theme.NotFound.title": "Página não encontrada",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Editar esta página",
- "theme.common.headingLinkTitle": "Link direto para o título",
+ "theme.common.headingLinkTitle": "Link direto para {heading}",
"theme.common.skipToMainContent": "Saltar para o conteúdo principal",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Colapsar barra lateral",
"theme.docs.sidebar.expandButtonAriaLabel": "Expandir barra lateral",
"theme.docs.sidebar.expandButtonTitle": "Expandir barra lateral",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} with \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "One doc tagged|{count} docs tagged",
diff --git a/packages/docusaurus-theme-translations/locales/ru/theme-common.json b/packages/docusaurus-theme-translations/locales/ru/theme-common.json
index 6a2feed11ad7..622b8fb95577 100644
--- a/packages/docusaurus-theme-translations/locales/ru/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/ru/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Свернуть/развернуть категорию '{label}'",
"theme.ErrorPageContent.title": "На странице произошёл сбой.",
"theme.ErrorPageContent.tryAgain": "Попробуйте ещё раз",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "К сожалению, мы не смогли найти запрашиваемую вами страницу.",
"theme.NotFound.p2": "Пожалуйста, обратитесь к владельцу сайта, с которого вы перешли на эту ссылку, чтобы сообщить ему, что ссылка не работает.",
"theme.NotFound.title": "Страница не найдена",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "Тёмный режим",
"theme.colorToggle.ariaLabel.mode.light": "Светлый режим",
"theme.common.editThisPage": "Отредактировать эту страницу",
- "theme.common.headingLinkTitle": "Прямая ссылка на этот заголовок",
+ "theme.common.headingLinkTitle": "Прямая ссылка на {heading}",
"theme.common.skipToMainContent": "Перейти к основному содержимому",
"theme.docs.DocCard.categoryDescription": "{count} элемент|{count} элемента|{count} элементов",
"theme.docs.breadcrumbs.home": "Главная страница",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Свернуть сайдбар",
"theme.docs.sidebar.expandButtonAriaLabel": "Развернуть сайдбар",
"theme.docs.sidebar.expandButtonTitle": "Развернуть сайдбар",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Переключить навигационную панель",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} с тегом \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Одна страница|{count} страницы|{count} страниц",
diff --git a/packages/docusaurus-theme-translations/locales/sl/plugin-ideal-image.json b/packages/docusaurus-theme-translations/locales/sl/plugin-ideal-image.json
new file mode 100644
index 000000000000..1234bdb2aa44
--- /dev/null
+++ b/packages/docusaurus-theme-translations/locales/sl/plugin-ideal-image.json
@@ -0,0 +1,7 @@
+{
+ "theme.IdealImageMessage.404error": "404. Slika ni najdena",
+ "theme.IdealImageMessage.error": "Napaka. Kliknite, da ponovno naložite stran",
+ "theme.IdealImageMessage.load": "Kliknite, da naložite{sizeMessage}",
+ "theme.IdealImageMessage.loading": "Nalaganje...",
+ "theme.IdealImageMessage.offline": "Vaš brskalnik nima povezave s spletom. Slike ni bilo možno naložiti"
+}
diff --git a/packages/docusaurus-theme-translations/locales/sl/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/sl/plugin-pwa.json
new file mode 100644
index 000000000000..2eafb26e73c6
--- /dev/null
+++ b/packages/docusaurus-theme-translations/locales/sl/plugin-pwa.json
@@ -0,0 +1,5 @@
+{
+ "theme.PwaReloadPopup.closeButtonAriaLabel": "Zapri",
+ "theme.PwaReloadPopup.info": "Na voljo je nova verzija",
+ "theme.PwaReloadPopup.refreshButtonText": "Prenesi"
+}
diff --git a/packages/docusaurus-theme-translations/locales/sl/theme-common.json b/packages/docusaurus-theme-translations/locales/sl/theme-common.json
new file mode 100644
index 000000000000..dbf9cd55f6d8
--- /dev/null
+++ b/packages/docusaurus-theme-translations/locales/sl/theme-common.json
@@ -0,0 +1,72 @@
+{
+ "theme.AnnouncementBar.closeButtonAriaLabel": "Zapri",
+ "theme.BackToTopButton.buttonAriaLabel": "Nazaj na vrh",
+ "theme.CodeBlock.copied": "Kopirano v odložišče",
+ "theme.CodeBlock.copy": "Kopiraj",
+ "theme.CodeBlock.copyButtonAriaLabel": "Kopiraj v odložišče",
+ "theme.CodeBlock.wordWrapToggle": "Preklopi oblivanje besedila",
+ "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Preklopi zložljivo kategorijo v stranski vrstici '{label}'",
+ "theme.ErrorPageContent.title": "Ta stran se je zrušila.",
+ "theme.ErrorPageContent.tryAgain": "Poskusite ponovno",
+ "theme.NavBar.navAriaLabel": "Glavna navigacija",
+ "theme.NotFound.p1": "Iskane strani ni bilo možno najti",
+ "theme.NotFound.p2": "Prosim kontaktirajte lastnike strani, s katere ste sledili povezavi in jih obvestite, da povezava ne deluje.",
+ "theme.NotFound.title": "Strani ni bilo možno najti",
+ "theme.TOCCollapsible.toggleButtonLabel": "Na tej strani",
+ "theme.admonition.caution": "pozor",
+ "theme.admonition.danger": "nevarnost",
+ "theme.admonition.info": "informacija",
+ "theme.admonition.note": "opomba",
+ "theme.admonition.tip": "namig",
+ "theme.blog.archive.description": "Arhiv",
+ "theme.blog.archive.title": "Arhiv",
+ "theme.blog.paginator.navAriaLabel": "Navigacija kazala po blogu",
+ "theme.blog.paginator.newerEntries": "Novejši prispevki",
+ "theme.blog.paginator.olderEntries": "Starejši prispevki",
+ "theme.blog.post.paginator.navAriaLabel": "Navigacija prispevka na blogu",
+ "theme.blog.post.paginator.newerPost": "Novejši prispevek",
+ "theme.blog.post.paginator.olderPost": "Starejši prispevek",
+ "theme.blog.post.plurals": "En prispevek|Dva prispevka|{count} prispevki|{count} prispevkov",
+ "theme.blog.post.readMore": "Preberite več",
+ "theme.blog.post.readMoreLabel": "Preberite več o {title}",
+ "theme.blog.post.readingTime.plurals": "Minuta branja|Minuti branja|{readingTime} minute branja|{readingTime} minut branja",
+ "theme.blog.sidebar.navAriaLabel": "Navigacija svežih prispevkov na blogu",
+ "theme.blog.tagTitle": "{nPosts} ima oznako \"{tagName}\"",
+ "theme.colorToggle.ariaLabel": "Preklopi med temnim in svetlim načinom (trenutno {mode})",
+ "theme.colorToggle.ariaLabel.mode.dark": "temni način",
+ "theme.colorToggle.ariaLabel.mode.light": "svetli način",
+ "theme.common.editThisPage": "Uredi to stran",
+ "theme.common.headingLinkTitle": "Direktna povezava na {heading}",
+ "theme.common.skipToMainContent": "Preskoči na vsebino",
+ "theme.docs.DocCard.categoryDescription": "{count} vnosov",
+ "theme.docs.breadcrumbs.home": "Domača stran",
+ "theme.docs.breadcrumbs.navAriaLabel": "Drobtine",
+ "theme.docs.paginator.navAriaLabel": "Navigacija po dokumentaciji",
+ "theme.docs.paginator.next": "Naslednji",
+ "theme.docs.paginator.previous": "Prejšnji",
+ "theme.docs.sidebar.closeSidebarButtonAriaLabel": "Zapri navigacijsko vrstico",
+ "theme.docs.sidebar.collapseButtonAriaLabel": "Skrči stransko vrstico",
+ "theme.docs.sidebar.collapseButtonTitle": "Skrči stransko vrstico",
+ "theme.docs.sidebar.expandButtonAriaLabel": "Razširi stransko vrstico",
+ "theme.docs.sidebar.expandButtonTitle": "Razširi stransko vrstico",
+ "theme.docs.sidebar.navAriaLabel": "Stranska vrstica dokumentacije",
+ "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Preklopi navigacijsko vrstico",
+ "theme.docs.tagDocListPageTitle": "{nDocsTagged} ima oznako \"{tagName}\"",
+ "theme.docs.tagDocListPageTitle.nDocsTagged": "En dokument ima oznako|Dva dokumenta imata oznako|{count} dokumenti imajo oznako|{count} dokumentov ima oznako",
+ "theme.docs.versionBadge.label": "Verzija: {versionLabel}",
+ "theme.docs.versions.latestVersionLinkLabel": "zadnja verzija",
+ "theme.docs.versions.latestVersionSuggestionLabel": "Za najnovejšo dokumentacijo, poglejte {latestVersionLink} ({versionLabel}).",
+ "theme.docs.versions.unmaintainedVersionLabel": "To je dokumentacija za {siteTitle} {versionLabel}, ki ni več aktivno vzdrževana.",
+ "theme.docs.versions.unreleasedVersionLabel": "To je še neobjavljena dokumentacija za {siteTitle}, verzijo {versionLabel}.",
+ "theme.lastUpdated.atDate": " {date}",
+ "theme.lastUpdated.byUser": " {user}",
+ "theme.lastUpdated.lastUpdatedAtBy": "Nazadnje posodobil {byUser}, {atDate}",
+ "theme.navbar.mobileLanguageDropdown.label": "Jeziki",
+ "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "← Nazaj na glavni meni",
+ "theme.navbar.mobileVersionsDropdown.label": "Verzije",
+ "theme.tags.tagsListLabel": "Oznake:",
+ "theme.tags.tagsPageLink": "Poglej vse oznake",
+ "theme.tags.tagsPageTitle": "Oznake",
+ "theme.unlistedContent.message": "Ta stran ni zabeležena. Iskalniki je ne bodo indeksirali, do nje bodo uporabniki lahko dostopali le z direktno povezavo.",
+ "theme.unlistedContent.title": "Nezabeležena stran"
+}
diff --git a/packages/docusaurus-theme-translations/locales/sl/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/sl/theme-live-codeblock.json
new file mode 100644
index 000000000000..5b56e53cbac0
--- /dev/null
+++ b/packages/docusaurus-theme-translations/locales/sl/theme-live-codeblock.json
@@ -0,0 +1,4 @@
+{
+ "theme.Playground.liveEditor": "Urejanje kode v živo",
+ "theme.Playground.result": "Rezultat"
+}
diff --git a/packages/docusaurus-theme-translations/locales/sl/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/sl/theme-search-algolia.json
new file mode 100644
index 000000000000..e2c1e41bc372
--- /dev/null
+++ b/packages/docusaurus-theme-translations/locales/sl/theme-search-algolia.json
@@ -0,0 +1,35 @@
+{
+ "theme.SearchBar.label": "Išči",
+ "theme.SearchBar.seeAll": "Poglej vse rezultate ({count})",
+ "theme.SearchModal.errorScreen.helpText": "Preverite vašo spletno povezavo.",
+ "theme.SearchModal.errorScreen.titleText": "Rezultatov ni bilo možno naložiti",
+ "theme.SearchModal.footer.closeKeyAriaLabel": "Tipka Escape",
+ "theme.SearchModal.footer.closeText": "zapri",
+ "theme.SearchModal.footer.navigateDownKeyAriaLabel": "Tipka puščica navzdol",
+ "theme.SearchModal.footer.navigateText": "naslednji/prejšnji rezultat",
+ "theme.SearchModal.footer.navigateUpKeyAriaLabel": "Tipka puščica navzgor",
+ "theme.SearchModal.footer.searchByText": "Iskanje",
+ "theme.SearchModal.footer.selectKeyAriaLabel": "tipka Enter",
+ "theme.SearchModal.footer.selectText": "izberi",
+ "theme.SearchModal.noResultsScreen.noResultsText": "Ni rezultatov za",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Obvestite nas.",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsText": "Mislite, da bi morali obstajati rezultati?",
+ "theme.SearchModal.noResultsScreen.suggestedQueryText": "Poskusite poiskati",
+ "theme.SearchModal.placeholder": "Išči po dokumentaciji",
+ "theme.SearchModal.searchBox.cancelButtonText": "Prekliči",
+ "theme.SearchModal.searchBox.resetButtonTitle": "Izprazni iskalni niz",
+ "theme.SearchModal.startScreen.favoriteSearchesTitle": "Priljubljena iskanja",
+ "theme.SearchModal.startScreen.noRecentSearchesText": "Ni iskanj pred kratkim",
+ "theme.SearchModal.startScreen.recentSearchesTitle": "Pred kratkim",
+ "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Umakni iskanje iz priljubljenih",
+ "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Umakni iskanje iz zgodovine",
+ "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Shrani to iskanje",
+ "theme.SearchPage.algoliaLabel": "Iskanje Algolia",
+ "theme.SearchPage.documentsFound.plurals": "Dokument najden|Dokumenta najdena|{count} dokumenti najdeni|{count} dokumentov najdenih",
+ "theme.SearchPage.emptyResultsTitle": "Išči po dokumentaciji",
+ "theme.SearchPage.existingResultsTitle": "Rezultati iskanja za \"{query}\"",
+ "theme.SearchPage.fetchingNewResults": "Nalagam nove rezultate...",
+ "theme.SearchPage.inputLabel": "Išči",
+ "theme.SearchPage.inputPlaceholder": "Vnesite iskalni niz tukaj",
+ "theme.SearchPage.noResultsText": "Ni bilo rezultatov"
+}
diff --git a/packages/docusaurus-theme-translations/locales/sr/theme-common.json b/packages/docusaurus-theme-translations/locales/sr/theme-common.json
index 8d9931f67d17..ea36550a9e63 100644
--- a/packages/docusaurus-theme-translations/locales/sr/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/sr/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "This page crashed.",
"theme.ErrorPageContent.tryAgain": "Try again",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Тражени резултат не постоји.",
"theme.NotFound.p2": "Молимо вас да контактирате власника сајта који вас је упутио овде и обавестите га да је њихова веза нетачна.",
"theme.NotFound.title": "Страница није пронађена",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "dark mode",
"theme.colorToggle.ariaLabel.mode.light": "light mode",
"theme.common.editThisPage": "Уреди ову страницу",
- "theme.common.headingLinkTitle": "Веза до наслова",
+ "theme.common.headingLinkTitle": "Веза до {heading}",
"theme.common.skipToMainContent": "Пређи на главни садржај",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Home page",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Сакриј бочну листу",
"theme.docs.sidebar.expandButtonAriaLabel": "Прошири бочну листу",
"theme.docs.sidebar.expandButtonTitle": "Прошири бочну листу",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} означени са \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Један документ означен|{count} означених докумената",
diff --git a/packages/docusaurus-theme-translations/locales/sv/theme-common.json b/packages/docusaurus-theme-translations/locales/sv/theme-common.json
index b8e1a8df50b5..3d82c3bec207 100644
--- a/packages/docusaurus-theme-translations/locales/sv/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/sv/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Växla den hopfällbara sidomenyn för kategori '{label}'",
"theme.ErrorPageContent.title": "Denna sida har kraschat.",
"theme.ErrorPageContent.tryAgain": "Försök igen",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Vi kunde inte hitta det du letade efter.",
"theme.NotFound.p2": "Vänligen kontakta ägaren av webbplatsen som länkade dig till den ursprungliga webbadressen och låt dem veta att denna länk är trasig.",
"theme.NotFound.title": "Sidan Hittades Inte",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "mörkt utseende",
"theme.colorToggle.ariaLabel.mode.light": "ljust utseende",
"theme.common.editThisPage": "Redigera denna sida",
- "theme.common.headingLinkTitle": "Direktlänk till huvudtitel",
+ "theme.common.headingLinkTitle": "Direktlänk till {heading}",
"theme.common.skipToMainContent": "Hoppa till huvudinnehåll",
"theme.docs.DocCard.categoryDescription": "{count} artiklar",
"theme.docs.breadcrumbs.home": "Hemsida",
@@ -48,7 +49,8 @@
"theme.docs.sidebar.collapseButtonTitle": "Stäng sidofältet",
"theme.docs.sidebar.expandButtonAriaLabel": "Expandera sidofältet",
"theme.docs.sidebar.expandButtonTitle": "Expandera sidofältet",
- "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
+ "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Visa/göm navigationen",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} med \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Ett dokument taggat|{count} dokument taggade",
"theme.docs.versionBadge.label": "Version: {versionLabel}",
diff --git a/packages/docusaurus-theme-translations/locales/sv/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/sv/theme-search-algolia.json
index 34c29f8cc781..c5477d8b5988 100644
--- a/packages/docusaurus-theme-translations/locales/sv/theme-search-algolia.json
+++ b/packages/docusaurus-theme-translations/locales/sv/theme-search-algolia.json
@@ -1,30 +1,30 @@
{
"theme.SearchBar.label": "Sök",
"theme.SearchBar.seeAll": "Se alla {count} resultat",
- "theme.SearchModal.errorScreen.helpText": "You might want to check your network connection.",
- "theme.SearchModal.errorScreen.titleText": "Unable to fetch results",
- "theme.SearchModal.footer.closeKeyAriaLabel": "Escape key",
- "theme.SearchModal.footer.closeText": "to close",
- "theme.SearchModal.footer.navigateDownKeyAriaLabel": "Arrow down",
- "theme.SearchModal.footer.navigateText": "to navigate",
- "theme.SearchModal.footer.navigateUpKeyAriaLabel": "Arrow up",
- "theme.SearchModal.footer.searchByText": "Search by",
- "theme.SearchModal.footer.selectKeyAriaLabel": "Enter key",
- "theme.SearchModal.footer.selectText": "to select",
- "theme.SearchModal.noResultsScreen.noResultsText": "No results for",
- "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Let us know.",
- "theme.SearchModal.noResultsScreen.reportMissingResultsText": "Believe this query should return results?",
- "theme.SearchModal.noResultsScreen.suggestedQueryText": "Try searching for",
- "theme.SearchModal.placeholder": "Search docs",
- "theme.SearchModal.searchBox.cancelButtonText": "Cancel",
- "theme.SearchModal.searchBox.resetButtonTitle": "Clear the query",
- "theme.SearchModal.startScreen.favoriteSearchesTitle": "Favorite",
- "theme.SearchModal.startScreen.noRecentSearchesText": "No recent searches",
- "theme.SearchModal.startScreen.recentSearchesTitle": "Recent",
- "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Remove this search from favorites",
- "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Remove this search from history",
- "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Save this search",
- "theme.SearchPage.algoliaLabel": "Search by Algolia",
+ "theme.SearchModal.errorScreen.helpText": "Du kanske vill kontrollera din nätverksanslutning.",
+ "theme.SearchModal.errorScreen.titleText": "Kunde inte hämta resultat",
+ "theme.SearchModal.footer.closeKeyAriaLabel": "Escape-tangenten",
+ "theme.SearchModal.footer.closeText": "för att stänga",
+ "theme.SearchModal.footer.navigateDownKeyAriaLabel": "Pil ned",
+ "theme.SearchModal.footer.navigateText": "för att navigera",
+ "theme.SearchModal.footer.navigateUpKeyAriaLabel": "Pil upp",
+ "theme.SearchModal.footer.searchByText": "Sökning från",
+ "theme.SearchModal.footer.selectKeyAriaLabel": "Enter-tangenten",
+ "theme.SearchModal.footer.selectText": "för att välja",
+ "theme.SearchModal.noResultsScreen.noResultsText": "Inga resultat för",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Återkoppla.",
+ "theme.SearchModal.noResultsScreen.reportMissingResultsText": "Tycker du att sökningen borde returnera resultat?",
+ "theme.SearchModal.noResultsScreen.suggestedQueryText": "Försöka söka efter",
+ "theme.SearchModal.placeholder": "Sök i dokumentationen",
+ "theme.SearchModal.searchBox.cancelButtonText": "Avbryt",
+ "theme.SearchModal.searchBox.resetButtonTitle": "Rensa sökningen",
+ "theme.SearchModal.startScreen.favoriteSearchesTitle": "Favoriter",
+ "theme.SearchModal.startScreen.noRecentSearchesText": "Inga senaste sökningar",
+ "theme.SearchModal.startScreen.recentSearchesTitle": "Senaste sökningar",
+ "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Ta bort från favoriter",
+ "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Ta bort från historiken",
+ "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Lägg till som favorit",
+ "theme.SearchPage.algoliaLabel": "Sökning från Algolia",
"theme.SearchPage.documentsFound.plurals": "Ett dokument hittades|{count} dokument hittades",
"theme.SearchPage.emptyResultsTitle": "Sök genom dokumentationen",
"theme.SearchPage.existingResultsTitle": "Sökresultat för \"{query}\"",
diff --git a/packages/docusaurus-theme-translations/locales/tr/theme-common.json b/packages/docusaurus-theme-translations/locales/tr/theme-common.json
index 69c5647f151d..613b15158c18 100644
--- a/packages/docusaurus-theme-translations/locales/tr/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/tr/theme-common.json
@@ -4,19 +4,20 @@
"theme.CodeBlock.copied": "Kopyalandı",
"theme.CodeBlock.copy": "Kopyala",
"theme.CodeBlock.copyButtonAriaLabel": "Kodu panoya kopyala",
- "theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
+ "theme.CodeBlock.wordWrapToggle": "Kelime kaydırmayı aç/kapat",
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
"theme.ErrorPageContent.title": "Bu sayfa çöktü.",
"theme.ErrorPageContent.tryAgain": "Tekrar deneyin",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Aradığınız şeyi bulamadık.",
"theme.NotFound.p2": "Lütfen sizi orijinal URL'ye yönlendiren sitenin sahibiyle iletişime geçin ve bağlantısının bozuk olduğunu bildirin.",
"theme.NotFound.title": "Sayfa Bulunamadı",
"theme.TOCCollapsible.toggleButtonLabel": "Bu sayfada",
- "theme.admonition.caution": "caution",
- "theme.admonition.danger": "danger",
- "theme.admonition.info": "info",
- "theme.admonition.note": "note",
- "theme.admonition.tip": "tip",
+ "theme.admonition.caution": "uyarı",
+ "theme.admonition.danger": "tehlike",
+ "theme.admonition.info": "bilgi",
+ "theme.admonition.note": "not",
+ "theme.admonition.tip": "ipucu",
"theme.blog.archive.description": "Arşiv",
"theme.blog.archive.title": "Arşiv",
"theme.blog.paginator.navAriaLabel": "Blog gönderi sayfası navigasyonu",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "Karanlık mod",
"theme.colorToggle.ariaLabel.mode.light": "Aydınlık mod",
"theme.common.editThisPage": "Bu sayfayı düzenle",
- "theme.common.headingLinkTitle": "Başlığa doğrudan bağlantı",
+ "theme.common.headingLinkTitle": "{heading} doğrudan bağlantı",
"theme.common.skipToMainContent": "Ana içeriğe geç",
"theme.docs.DocCard.categoryDescription": "{count} items",
"theme.docs.breadcrumbs.home": "Ana sayfa",
@@ -43,12 +44,13 @@
"theme.docs.paginator.navAriaLabel": "Dokümanlar sayfası navigasyonu",
"theme.docs.paginator.next": "Sonraki",
"theme.docs.paginator.previous": "Önceki",
- "theme.docs.sidebar.closeSidebarButtonAriaLabel": "Close navigation bar",
+ "theme.docs.sidebar.closeSidebarButtonAriaLabel": "Gezinme çubuğunu kapat",
"theme.docs.sidebar.collapseButtonAriaLabel": "Kenar çubuğunu daralt",
"theme.docs.sidebar.collapseButtonTitle": "Kenar çubuğunu daralt",
"theme.docs.sidebar.expandButtonAriaLabel": "Kenar çubuğunu genişlet",
"theme.docs.sidebar.expandButtonTitle": "Kenar çubuğunu genişlet",
- "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
+ "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Gezinme çubuğunu aç/kapat",
"theme.docs.tagDocListPageTitle": "\"{tagName}\" ile etiketlenmiş {nDocsTagged}",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Bir doküman etiketlendi|{count} doküman etiketlendi",
"theme.docs.versionBadge.label": "Version: {versionLabel}",
@@ -64,5 +66,7 @@
"theme.navbar.mobileVersionsDropdown.label": "Versiyonlar",
"theme.tags.tagsListLabel": "Etiketler:",
"theme.tags.tagsPageLink": "Tüm Etiketleri Görüntüle",
- "theme.tags.tagsPageTitle": "Etiketler"
+ "theme.tags.tagsPageTitle": "Etiketler",
+ "theme.unlistedContent.message": "Bu sayfa listelenmemiş. Arama motorları dizine eklemez ve yalnızca doğrudan bağlantısı olan kullanıcılar buna erişebilir.",
+ "theme.unlistedContent.title": "Listelenmeyen sayfa"
}
diff --git a/packages/docusaurus-theme-translations/locales/uk/theme-common.json b/packages/docusaurus-theme-translations/locales/uk/theme-common.json
index 0a838bd2682f..2cde77e5aa5f 100644
--- a/packages/docusaurus-theme-translations/locales/uk/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/uk/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Згорнути/розгорнути категорію '{label}'",
"theme.ErrorPageContent.title": "На сторінці стався збій.",
"theme.ErrorPageContent.tryAgain": "Спробуйте ще раз",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "На жаль, ми не змогли знайти сторінку, яку ви запитували.",
"theme.NotFound.p2": "Будь ласка, зверніться до власника сайту, з якого ви перейшли на це посилання, щоб повідомити, що посилання не працює.",
"theme.NotFound.title": "Сторінку не знайдено",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "Темний режим",
"theme.colorToggle.ariaLabel.mode.light": "Світлий режим",
"theme.common.editThisPage": "Відредагувати цю сторінку",
- "theme.common.headingLinkTitle": "Пряме посилання на цей заголовок",
+ "theme.common.headingLinkTitle": "Пряме посилання на {heading}",
"theme.common.skipToMainContent": "Перейти до основного вмісту",
"theme.docs.DocCard.categoryDescription": "{count} елемент|{count} елементи|{count} елементів",
"theme.docs.breadcrumbs.home": "Головна сторінка",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Згорнути сайдбар",
"theme.docs.sidebar.expandButtonAriaLabel": "Розгорнути сайдбар",
"theme.docs.sidebar.expandButtonTitle": "Розгорнути сайдбар",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} з тегом \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "Одна сторінка|{count} сторінки|{count} сторінок",
diff --git a/packages/docusaurus-theme-translations/locales/vi/theme-common.json b/packages/docusaurus-theme-translations/locales/vi/theme-common.json
index 4784d3e47b77..727dcfc90649 100644
--- a/packages/docusaurus-theme-translations/locales/vi/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/vi/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Chuyển đổi danh mục thanh bên có thể thu gọn '{label}'",
"theme.ErrorPageContent.title": "Trang này đã bị lỗi.",
"theme.ErrorPageContent.tryAgain": "Thử lại",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "Chúng tôi không thể tìm thấy những gì bạn đang tìm kiếm.",
"theme.NotFound.p2": "Vui lòng liên hệ với trang web đã dẫn bạn tới đây và thông báo cho họ biết rằng đường dẫn này bị hỏng.",
"theme.NotFound.title": "Không tìm thấy trang",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "chế độ tối",
"theme.colorToggle.ariaLabel.mode.light": "chế độ sáng",
"theme.common.editThisPage": "Sửa trang này",
- "theme.common.headingLinkTitle": "Đường dẫn trực tiếp tới đề mục này",
+ "theme.common.headingLinkTitle": "Đường dẫn trực tiếp tới {heading}",
"theme.common.skipToMainContent": "Nhảy tới nội dung",
"theme.docs.DocCard.categoryDescription": "{count} mục",
"theme.docs.breadcrumbs.home": "Trang chủ",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "Thu gọn thanh bên",
"theme.docs.sidebar.expandButtonAriaLabel": "Mở rộng thanh bên",
"theme.docs.sidebar.expandButtonTitle": "Mở rộng thanh bên",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged} với \"{tagName}\"",
"theme.docs.tagDocListPageTitle.nDocsTagged": "{count} tài liệu đã gắn thẻ",
@@ -58,7 +60,7 @@
"theme.docs.versions.unreleasedVersionLabel": "Đây là tài liệu chưa được phát hành chính thức của {siteTitle} phiên bản {versionLabel}.",
"theme.lastUpdated.atDate": " vào {date}",
"theme.lastUpdated.byUser": " bởi {user}",
- "theme.lastUpdated.lastUpdatedAtBy": "Cập nhật lần cuối {atDate} bởi {byUser}",
+ "theme.lastUpdated.lastUpdatedAtBy": "Cập nhật lần cuối{atDate}{byUser}",
"theme.navbar.mobileLanguageDropdown.label": "Ngôn ngữ",
"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": "← Trở lại menu chính",
"theme.navbar.mobileVersionsDropdown.label": "Phiên bản",
diff --git a/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json
index 72d0efb2d229..664f86539cb7 100644
--- a/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json
+++ b/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json
@@ -25,7 +25,7 @@
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Xóa tìm kiếm này khỏi lịch sử",
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Lưu tìm kiếm này",
"theme.SearchPage.algoliaLabel": "Tìm kiếm với Algolia",
- "theme.SearchPage.documentsFound.plurals": "Tìm thấy một kết quả|Tìm thấy {count} kết quả",
+ "theme.SearchPage.documentsFound.plurals": "Tìm thấy {count} kết quả",
"theme.SearchPage.emptyResultsTitle": "Tìm kiếm",
"theme.SearchPage.existingResultsTitle": "Kết quả tìm kiếm cho \"{query}\"",
"theme.SearchPage.fetchingNewResults": "Đang tải thêm kết quả...",
diff --git a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json
index 6aebc6c4ac6c..80d298d9616f 100644
--- a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打开/收起侧边栏菜单「{label}」",
"theme.ErrorPageContent.title": "页面已崩溃。",
"theme.ErrorPageContent.tryAgain": "重试",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "我们找不到您要找的页面。",
"theme.NotFound.p2": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。",
"theme.NotFound.title": "找不到页面",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "暗黑模式",
"theme.colorToggle.ariaLabel.mode.light": "浅色模式",
"theme.common.editThisPage": "编辑此页",
- "theme.common.headingLinkTitle": "标题的直接链接",
+ "theme.common.headingLinkTitle": "{heading}的直接链接",
"theme.common.skipToMainContent": "跳到主要内容",
"theme.docs.DocCard.categoryDescription": "{count} 个项目",
"theme.docs.breadcrumbs.home": "主页面",
@@ -43,12 +44,13 @@
"theme.docs.paginator.navAriaLabel": "文档分页导航",
"theme.docs.paginator.next": "下一页",
"theme.docs.paginator.previous": "上一页",
- "theme.docs.sidebar.closeSidebarButtonAriaLabel": "Close navigation bar",
+ "theme.docs.sidebar.closeSidebarButtonAriaLabel": "关闭导航栏",
"theme.docs.sidebar.collapseButtonAriaLabel": "收起侧边栏",
"theme.docs.sidebar.collapseButtonTitle": "收起侧边栏",
"theme.docs.sidebar.expandButtonAriaLabel": "展开侧边栏",
"theme.docs.sidebar.expandButtonTitle": "展开侧边栏",
- "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
+ "theme.docs.sidebar.toggleSidebarButtonAriaLabel": "切换导航栏",
"theme.docs.tagDocListPageTitle": "{nDocsTagged}「{tagName}」",
"theme.docs.tagDocListPageTitle.nDocsTagged": "{count} 篇文档带有标签",
"theme.docs.versionBadge.label": "版本:{versionLabel}",
diff --git a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json
index 84a509608978..1e422f0efc0c 100644
--- a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json
+++ b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json
@@ -8,6 +8,7 @@
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打開/收起側邊欄選單「{label}」",
"theme.ErrorPageContent.title": "此頁已當機。",
"theme.ErrorPageContent.tryAgain": "重試",
+ "theme.NavBar.navAriaLabel": "Main",
"theme.NotFound.p1": "我們沒有您要找的頁面。",
"theme.NotFound.p2": "請聯絡原始連結來源網站的所有者,並通知他們連結已毀損。",
"theme.NotFound.title": "找不到頁面",
@@ -35,7 +36,7 @@
"theme.colorToggle.ariaLabel.mode.dark": "暗黑模式",
"theme.colorToggle.ariaLabel.mode.light": "淺色模式",
"theme.common.editThisPage": "編輯此頁",
- "theme.common.headingLinkTitle": "標題的直接連結",
+ "theme.common.headingLinkTitle": "{heading}的直接連結",
"theme.common.skipToMainContent": "跳至主要内容",
"theme.docs.DocCard.categoryDescription": "{count} 個項目",
"theme.docs.breadcrumbs.home": "主頁面",
@@ -48,6 +49,7 @@
"theme.docs.sidebar.collapseButtonTitle": "收起側邊欄",
"theme.docs.sidebar.expandButtonAriaLabel": "展開側邊欄",
"theme.docs.sidebar.expandButtonTitle": "展開側邊欄",
+ "theme.docs.sidebar.navAriaLabel": "Docs sidebar",
"theme.docs.sidebar.toggleSidebarButtonAriaLabel": "Toggle navigation bar",
"theme.docs.tagDocListPageTitle": "{nDocsTagged}「{tagName}」",
"theme.docs.tagDocListPageTitle.nDocsTagged": "{count} 篇文件帶有標籤",
diff --git a/packages/docusaurus-theme-translations/package.json b/packages/docusaurus-theme-translations/package.json
index 8ee9a4928a47..e59e99e0e228 100644
--- a/packages/docusaurus-theme-translations/package.json
+++ b/packages/docusaurus-theme-translations/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/theme-translations",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Docusaurus theme translations.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
@@ -23,8 +23,8 @@
"tslib": "^2.4.0"
},
"devDependencies": {
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
"lodash": "^4.17.21"
},
"engines": {
diff --git a/packages/docusaurus-types/package.json b/packages/docusaurus-types/package.json
index 96a735b192c9..040454499b1c 100644
--- a/packages/docusaurus-types/package.json
+++ b/packages/docusaurus-types/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/types",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Common types for Docusaurus packages.",
"types": "./src/index.d.ts",
"publishConfig": {
diff --git a/packages/docusaurus-utils-common/package.json b/packages/docusaurus-utils-common/package.json
index e8f0d9eb71c8..320d6683b75c 100644
--- a/packages/docusaurus-utils-common/package.json
+++ b/packages/docusaurus-utils-common/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/utils-common",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Common (Node/Browser) utility functions for Docusaurus packages.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
diff --git a/packages/docusaurus-utils-validation/package.json b/packages/docusaurus-utils-validation/package.json
index a4eb047fff1d..e5e3ece565fe 100644
--- a/packages/docusaurus-utils-validation/package.json
+++ b/packages/docusaurus-utils-validation/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/utils-validation",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Node validation utility functions for Docusaurus packages.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@@ -18,8 +18,8 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/utils": "2.2.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
"joi": "^17.6.0",
"js-yaml": "^4.1.0",
"tslib": "^2.4.0"
diff --git a/packages/docusaurus-utils/package.json b/packages/docusaurus-utils/package.json
index 09f1a4aa75b7..fc3eb8096b76 100644
--- a/packages/docusaurus-utils/package.json
+++ b/packages/docusaurus-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/utils",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Node utility functions for Docusaurus packages.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
@@ -18,8 +18,9 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/logger": "2.2.0",
+ "@docusaurus/logger": "2.3.0",
"@svgr/webpack": "^6.2.1",
+ "escape-string-regexp": "^4.0.0",
"file-loader": "^6.2.0",
"fs-extra": "^10.1.0",
"github-slugger": "^1.4.0",
@@ -38,7 +39,7 @@
"node": ">=16.14"
},
"devDependencies": {
- "@docusaurus/types": "2.2.0",
+ "@docusaurus/types": "2.3.0",
"@types/dedent": "^0.7.0",
"@types/github-slugger": "^1.3.0",
"@types/micromatch": "^4.0.2",
diff --git a/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts b/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts
index 42df2a38d4f1..579c47e826a0 100644
--- a/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts
+++ b/packages/docusaurus-utils/src/__tests__/markdownUtils.test.ts
@@ -195,7 +195,7 @@ describe('parseMarkdownContentTitle', () => {
});
});
- it('parses markdown h1 title at the top and unwrap inline code block', () => {
+ it('parses markdown h1 title inside backticks at the top and unwrap inline code block', () => {
const markdown = dedent`
# \`Markdown Title\`
@@ -209,6 +209,20 @@ describe('parseMarkdownContentTitle', () => {
});
});
+ it('parses markdown h1 title with interspersed backticks at the top and unwrap inline code block', () => {
+ const markdown = dedent`
+
+ # Markdown \`Title\` With \`Many\` Backticks!
+
+ Lorem Ipsum
+
+ `;
+ expect(parseMarkdownContentTitle(markdown)).toEqual({
+ content: markdown,
+ contentTitle: 'Markdown Title With Many Backticks!',
+ });
+ });
+
it('parses markdown h1 title and trim content', () => {
const markdown = `
diff --git a/packages/docusaurus-utils/src/index.ts b/packages/docusaurus-utils/src/index.ts
index 06f553c43f1c..347e03844964 100644
--- a/packages/docusaurus-utils/src/index.ts
+++ b/packages/docusaurus-utils/src/index.ts
@@ -103,3 +103,4 @@ export {
findFolderContainingFile,
getFolderContainingFile,
} from './dataFileUtils';
+export {escapeRegexp} from './regExpUtils';
diff --git a/packages/docusaurus-utils/src/markdownUtils.ts b/packages/docusaurus-utils/src/markdownUtils.ts
index 512a09bf916d..f97638a49d60 100644
--- a/packages/docusaurus-utils/src/markdownUtils.ts
+++ b/packages/docusaurus-utils/src/markdownUtils.ts
@@ -155,10 +155,7 @@ export function parseFrontMatter(markdownFileContent: string): {
}
function toTextContentTitle(contentTitle: string): string {
- if (contentTitle.startsWith('`') && contentTitle.endsWith('`')) {
- return contentTitle.substring(1, contentTitle.length - 1);
- }
- return contentTitle;
+ return contentTitle.replace(/`(?[^`]*)`/g, '$');
}
type ParseMarkdownContentTitleOptions = {
diff --git a/packages/docusaurus-utils/src/regExpUtils.ts b/packages/docusaurus-utils/src/regExpUtils.ts
new file mode 100644
index 000000000000..7240188ced96
--- /dev/null
+++ b/packages/docusaurus-utils/src/regExpUtils.ts
@@ -0,0 +1,12 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import escapeStringRegexp from 'escape-string-regexp';
+
+export function escapeRegexp(string: string): string {
+ return escapeStringRegexp(string);
+}
diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs
index 98a03e66e51d..76cead11dbaf 100755
--- a/packages/docusaurus/bin/docusaurus.mjs
+++ b/packages/docusaurus/bin/docusaurus.mjs
@@ -104,6 +104,23 @@ cli
)
.action(deploy);
+/**
+ * @param {string | undefined} value
+ * @returns {boolean | number}
+ */
+function normalizePollValue(value) {
+ if (value === undefined || value === '') {
+ return false;
+ }
+
+ const parsedIntValue = Number.parseInt(value, 10);
+ if (!Number.isNaN(parsedIntValue)) {
+ return parsedIntValue;
+ }
+
+ return value === 'true';
+}
+
cli
.command('start [siteDir]')
.description('Start the development server.')
@@ -122,6 +139,7 @@ cli
.option(
'--poll [interval]',
'use polling rather than watching for reload (default: false). Can specify a poll interval in milliseconds',
+ normalizePollValue,
)
.option(
'--no-minify',
diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json
index 6ec3d16f6edd..c9a887ac7d54 100644
--- a/packages/docusaurus/package.json
+++ b/packages/docusaurus/package.json
@@ -1,7 +1,7 @@
{
"name": "@docusaurus/core",
"description": "Easy to Maintain Open Source Documentation Websites",
- "version": "2.2.0",
+ "version": "2.3.0",
"license": "MIT",
"publishConfig": {
"access": "public"
@@ -43,13 +43,13 @@
"@babel/runtime": "^7.18.6",
"@babel/runtime-corejs3": "^7.18.6",
"@babel/traverse": "^7.18.8",
- "@docusaurus/cssnano-preset": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/mdx-loader": "2.2.0",
+ "@docusaurus/cssnano-preset": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/mdx-loader": "2.3.0",
"@docusaurus/react-loadable": "5.5.2",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-common": "2.2.0",
- "@docusaurus/utils-validation": "2.2.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-common": "2.3.0",
+ "@docusaurus/utils-validation": "2.3.0",
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
"@svgr/webpack": "^6.2.1",
"autoprefixer": "^10.4.7",
@@ -106,8 +106,8 @@
"webpackbar": "^5.0.2"
},
"devDependencies": {
- "@docusaurus/module-type-aliases": "2.2.0",
- "@docusaurus/types": "2.2.0",
+ "@docusaurus/module-type-aliases": "2.3.0",
+ "@docusaurus/types": "2.3.0",
"@types/detect-port": "^1.3.2",
"@types/react-dom": "^18.0.6",
"@types/react-router-config": "^5.0.6",
diff --git a/packages/docusaurus/src/client/ClientLifecyclesDispatcher.tsx b/packages/docusaurus/src/client/ClientLifecyclesDispatcher.tsx
index e9cb7f8d5f5a..c7b433686421 100644
--- a/packages/docusaurus/src/client/ClientLifecyclesDispatcher.tsx
+++ b/packages/docusaurus/src/client/ClientLifecyclesDispatcher.tsx
@@ -27,7 +27,26 @@ export function dispatchLifecycleAction(
return () => callbacks.forEach((cb) => cb?.());
}
-function scrollAfterNavigation(location: Location) {
+function scrollAfterNavigation({
+ location,
+ previousLocation,
+}: {
+ location: Location;
+ previousLocation: Location | null;
+}) {
+ if (!previousLocation) {
+ return; // no-op: use native browser feature
+ }
+
+ const samePathname = location.pathname === previousLocation.pathname;
+ const sameHash = location.hash === previousLocation.hash;
+ const sameSearch = location.search === previousLocation.search;
+
+ // Query-string changes: do not scroll to top/hash
+ if (samePathname && sameHash && !sameSearch) {
+ return;
+ }
+
const {hash} = location;
if (!hash) {
window.scrollTo(0, 0);
@@ -49,9 +68,7 @@ function ClientLifecyclesDispatcher({
}): JSX.Element {
useLayoutEffect(() => {
if (previousLocation !== location) {
- if (previousLocation) {
- scrollAfterNavigation(location);
- }
+ scrollAfterNavigation({location, previousLocation});
dispatchLifecycleAction('onRouteDidUpdate', {previousLocation, location});
}
}, [previousLocation, location]);
diff --git a/packages/docusaurus/src/client/exports/useBaseUrl.ts b/packages/docusaurus/src/client/exports/useBaseUrl.ts
index c5481e57670f..0ba33b8c24ea 100644
--- a/packages/docusaurus/src/client/exports/useBaseUrl.ts
+++ b/packages/docusaurus/src/client/exports/useBaseUrl.ts
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
+import {useCallback} from 'react';
import useDocusaurusContext from './useDocusaurusContext';
import {hasProtocol} from './isInternalUrl';
import type {BaseUrlOptions, BaseUrlUtils} from '@docusaurus/useBaseUrl';
@@ -43,8 +44,15 @@ export function useBaseUrlUtils(): BaseUrlUtils {
const {
siteConfig: {baseUrl, url: siteUrl},
} = useDocusaurusContext();
+
+ const withBaseUrl = useCallback(
+ (url: string, options?: BaseUrlOptions) =>
+ addBaseUrl(siteUrl, baseUrl, url, options),
+ [siteUrl, baseUrl],
+ );
+
return {
- withBaseUrl: (url, options) => addBaseUrl(siteUrl, baseUrl, url, options),
+ withBaseUrl,
};
}
diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts
index 92c20e6398d2..6250f0095bef 100644
--- a/packages/docusaurus/src/commands/build.ts
+++ b/packages/docusaurus/src/commands/build.ts
@@ -199,7 +199,11 @@ async function buildLocale({
serverConfig = merge(serverConfig, {
plugins: [
new CopyWebpackPlugin({
- patterns: staticDirectories.map((dir) => ({from: dir, to: outDir})),
+ patterns: staticDirectories.map((dir) => ({
+ from: dir,
+ to: outDir,
+ toType: 'dir',
+ })),
}),
],
});
diff --git a/packages/docusaurus/src/commands/deploy.ts b/packages/docusaurus/src/commands/deploy.ts
index 90d6f9cc5ee7..38c422b4090b 100644
--- a/packages/docusaurus/src/commands/deploy.ts
+++ b/packages/docusaurus/src/commands/deploy.ts
@@ -66,7 +66,7 @@ This behavior can have SEO impacts and create relative link issues.
// Source repo is the repo from where the command is invoked
const sourceRepoUrl = shell
- .exec('git config --get remote.origin.url', {silent: true})
+ .exec('git remote get-url origin', {silent: true})
.stdout.trim();
// The source branch; defaults to the currently checked out branch
diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap
index 2971f6e9f8c7..31c20d35685a 100644
--- a/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap
+++ b/packages/docusaurus/src/commands/swizzle/__tests__/__snapshots__/index.test.ts.snap
@@ -1,5 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`swizzle eject ComponentInFolder JS: ComponentInFolder/ComponentInSubFolder/index.css 1`] = `
+".testClass {
+ background: black;
+}
+"
+`;
+
+exports[`swizzle eject ComponentInFolder JS: ComponentInFolder/ComponentInSubFolder/styles.css 1`] = `
+".testClass {
+ background: black;
+}
+"
+`;
+
+exports[`swizzle eject ComponentInFolder JS: ComponentInFolder/ComponentInSubFolder/styles.module.css 1`] = `
+".testClass {
+ background: black;
+}
+"
+`;
+
exports[`swizzle eject ComponentInFolder JS: ComponentInFolder/Sibling.css 1`] = `
".testClass {
background: black;
@@ -17,10 +38,44 @@ exports[`swizzle eject ComponentInFolder JS: ComponentInFolder/index.css 1`] = `
exports[`swizzle eject ComponentInFolder JS: theme dir tree 1`] = `
"theme
└── ComponentInFolder
+ ├── ComponentInSubFolder
+ │ ├── index.css
+ │ ├── styles.css
+ │ └── styles.module.css
├── Sibling.css
└── index.css"
`;
+exports[`swizzle eject ComponentInFolder TS: ComponentInFolder/ComponentInSubFolder/index.css 1`] = `
+".testClass {
+ background: black;
+}
+"
+`;
+
+exports[`swizzle eject ComponentInFolder TS: ComponentInFolder/ComponentInSubFolder/index.tsx 1`] = `
+"import React from 'react';
+
+export default function ComponentInSubFolder() {
+ return ComponentInSubFolder
;
+}
+"
+`;
+
+exports[`swizzle eject ComponentInFolder TS: ComponentInFolder/ComponentInSubFolder/styles.css 1`] = `
+".testClass {
+ background: black;
+}
+"
+`;
+
+exports[`swizzle eject ComponentInFolder TS: ComponentInFolder/ComponentInSubFolder/styles.module.css 1`] = `
+".testClass {
+ background: black;
+}
+"
+`;
+
exports[`swizzle eject ComponentInFolder TS: ComponentInFolder/Sibling.css 1`] = `
".testClass {
background: black;
@@ -56,6 +111,11 @@ export default function ComponentInFolder() {
exports[`swizzle eject ComponentInFolder TS: theme dir tree 1`] = `
"theme
└── ComponentInFolder
+ ├── ComponentInSubFolder
+ │ ├── index.css
+ │ ├── index.tsx
+ │ ├── styles.css
+ │ └── styles.module.css
├── Sibling.css
├── Sibling.tsx
├── index.css
diff --git a/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts b/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts
index b6e7bed38bde..d13a32cc5bd6 100644
--- a/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts
+++ b/packages/docusaurus/src/commands/swizzle/__tests__/actions.test.ts
@@ -110,9 +110,10 @@ describe('eject', () => {
it(`eject ${Components.ComponentInFolder}`, async () => {
const result = await testEject('eject', Components.ComponentInFolder);
expect(result.createdFiles).toEqual([
- // TODO do we really want to copy those Sibling components?
- // It's hard to filter those reliably
- // (index.* is not good, we need to include styles.css too)
+ 'ComponentInFolder/ComponentInSubFolder/index.css',
+ 'ComponentInFolder/ComponentInSubFolder/index.tsx',
+ 'ComponentInFolder/ComponentInSubFolder/styles.css',
+ 'ComponentInFolder/ComponentInSubFolder/styles.module.css',
'ComponentInFolder/Sibling.css',
'ComponentInFolder/Sibling.tsx',
'ComponentInFolder/index.css',
@@ -121,6 +122,11 @@ describe('eject', () => {
expect(result.tree).toMatchInlineSnapshot(`
"theme
└── ComponentInFolder
+ ├── ComponentInSubFolder
+ │ ├── index.css
+ │ ├── index.tsx
+ │ ├── styles.css
+ │ └── styles.module.css
├── Sibling.css
├── Sibling.tsx
├── index.css
diff --git a/packages/docusaurus/src/commands/swizzle/actions.ts b/packages/docusaurus/src/commands/swizzle/actions.ts
index a9082737c104..1bbdb6f47d79 100644
--- a/packages/docusaurus/src/commands/swizzle/actions.ts
+++ b/packages/docusaurus/src/commands/swizzle/actions.ts
@@ -56,7 +56,7 @@ export async function eject({
const isDirectory = await isDir(fromPath);
const globPattern = isDirectory
? // Do we really want to copy all components?
- path.join(fromPath, '*')
+ path.join(fromPath, '**/*')
: `${fromPath}.*`;
const globPatternPosix = posixPath(globPattern);
@@ -67,6 +67,7 @@ export async function eject({
// When ejecting JS components, we want to avoid emitting TS files
// In particular the .d.ts files that theme build output contains
typescript ? null : '**/*.{d.ts,ts,tsx}',
+ '**/{__fixtures__,__tests__}/*',
]),
});
diff --git a/packages/docusaurus/src/commands/swizzle/components.ts b/packages/docusaurus/src/commands/swizzle/components.ts
index 9475ce33dbc9..50ae374a6765 100644
--- a/packages/docusaurus/src/commands/swizzle/components.ts
+++ b/packages/docusaurus/src/commands/swizzle/components.ts
@@ -50,7 +50,7 @@ function sortComponentNames(componentNames: string[]): string[] {
*
* @param componentNames the original list of component names
*/
-function getMissingIntermediateComponentFolderNames(
+export function getMissingIntermediateComponentFolderNames(
componentNames: string[],
): string[] {
function getAllIntermediatePaths(componentName: string): string[] {
diff --git a/packages/docusaurus/src/server/__tests__/routes.test.ts b/packages/docusaurus/src/server/__tests__/routes.test.ts
index a2f22058da4b..c0e60559cb7a 100644
--- a/packages/docusaurus/src/server/__tests__/routes.test.ts
+++ b/packages/docusaurus/src/server/__tests__/routes.test.ts
@@ -56,6 +56,40 @@ describe('genChunkName', () => {
});
expect(genChunkName('d', undefined, undefined, true)).toBe('8277e091');
});
+
+ // https://github.com/facebook/docusaurus/issues/8536
+ it('avoids hash collisions', () => {
+ expect(
+ genChunkName(
+ '@site/blog/2022-11-18-bye-medium/index.mdx?truncated=true',
+ 'content',
+ 'blog',
+ false,
+ ),
+ ).not.toBe(
+ genChunkName(
+ '@site/blog/2019-10-05-react-nfc/index.mdx?truncated=true',
+ 'content',
+ 'blog',
+ false,
+ ),
+ );
+ expect(
+ genChunkName(
+ '@site/blog/2022-11-18-bye-medium/index.mdx?truncated=true',
+ 'content',
+ 'blog',
+ true,
+ ),
+ ).not.toBe(
+ genChunkName(
+ '@site/blog/2019-10-05-react-nfc/index.mdx?truncated=true',
+ 'content',
+ 'blog',
+ true,
+ ),
+ );
+ });
});
describe('handleDuplicateRoutes', () => {
diff --git a/packages/docusaurus/src/server/routes.ts b/packages/docusaurus/src/server/routes.ts
index 56230415f127..b12f109d181d 100644
--- a/packages/docusaurus/src/server/routes.ts
+++ b/packages/docusaurus/src/server/routes.ts
@@ -51,6 +51,7 @@ function indent(str: string) {
}
const chunkNameCache = new Map();
+const chunkNameCount = new Map();
/**
* Generates a unique chunk name that can be used in the chunk registry.
@@ -79,10 +80,15 @@ export function genChunkName(
const shortHash = simpleHash(modulePath, 3);
str = `${preferredName}${shortHash}`;
}
- const name = str === '/' ? 'index' : docuHash(str);
+ const name = docuHash(str);
chunkName = prefix ? `${prefix}---${name}` : name;
}
+ const seenCount = (chunkNameCount.get(chunkName) ?? 0) + 1;
+ if (seenCount > 1) {
+ chunkName += seenCount.toString(36);
+ }
chunkNameCache.set(modulePath, chunkName);
+ chunkNameCount.set(chunkName, seenCount);
}
return chunkName;
}
diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json
index 75971c1b2ab0..876da73210f9 100644
--- a/packages/eslint-plugin/package.json
+++ b/packages/eslint-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/eslint-plugin",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "ESLint plugin to enforce best Docusaurus practices.",
"main": "lib/index.js",
"keywords": [
diff --git a/packages/eslint-plugin/src/index.ts b/packages/eslint-plugin/src/index.ts
index 1274bc31dfee..022604341bef 100644
--- a/packages/eslint-plugin/src/index.ts
+++ b/packages/eslint-plugin/src/index.ts
@@ -11,11 +11,13 @@ export = {
rules,
configs: {
recommended: {
+ plugins: ['@docusaurus'],
rules: {
'@docusaurus/string-literal-i18n-messages': 'error',
},
},
all: {
+ plugins: ['@docusaurus'],
rules: {
'@docusaurus/string-literal-i18n-messages': 'error',
'@docusaurus/no-untranslated-text': 'warn',
diff --git a/packages/lqip-loader/package.json b/packages/lqip-loader/package.json
index d2528429cb1f..301bb8ef990a 100644
--- a/packages/lqip-loader/package.json
+++ b/packages/lqip-loader/package.json
@@ -1,6 +1,6 @@
{
"name": "@docusaurus/lqip-loader",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Low Quality Image Placeholders (LQIP) loader for webpack.",
"main": "lib/index.js",
"publishConfig": {
@@ -17,7 +17,7 @@
},
"license": "MIT",
"dependencies": {
- "@docusaurus/logger": "2.2.0",
+ "@docusaurus/logger": "2.3.0",
"file-loader": "^6.2.0",
"lodash": "^4.17.21",
"sharp": "^0.30.7",
diff --git a/packages/stylelint-copyright/package.json b/packages/stylelint-copyright/package.json
index 89c78db4afab..a136724174ac 100644
--- a/packages/stylelint-copyright/package.json
+++ b/packages/stylelint-copyright/package.json
@@ -1,6 +1,6 @@
{
"name": "stylelint-copyright",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Stylelint plugin to check CSS files for a copyright header.",
"main": "lib/index.js",
"license": "MIT",
diff --git a/website/_dogfooding/_pages tests/markdownPageTests.md b/website/_dogfooding/_pages tests/markdownPageTests.md
index 323c741ee3e2..ce1670413425 100644
--- a/website/_dogfooding/_pages tests/markdownPageTests.md
+++ b/website/_dogfooding/_pages tests/markdownPageTests.md
@@ -239,3 +239,31 @@ Can be arbitrarily nested:
Admonition body
:::
+
+:::important
+
+Admonition alias `:::important` should have Important title
+
+:::
+
+:::::note title
+
+Some **content** with _Markdown_ `syntax`.
+
+::::note nested Title
+
+:::tip very nested Title
+
+Some **content** with _Markdown_ `syntax`.
+
+:::
+
+Some **content** with _Markdown_ `syntax`.
+
+::::
+
+hey
+
+:::::
+
+after admonition
diff --git a/website/_dogfooding/testSwizzleThemeClassic.mjs b/website/_dogfooding/testSwizzleThemeClassic.mjs
index 0f6af4da0609..0bb8f2eb72fd 100644
--- a/website/_dogfooding/testSwizzleThemeClassic.mjs
+++ b/website/_dogfooding/testSwizzleThemeClassic.mjs
@@ -13,7 +13,10 @@ import logger from '@docusaurus/logger';
import classicTheme from '@docusaurus/theme-classic';
// Unsafe imports
-import {readComponentNames} from '@docusaurus/core/lib/commands/swizzle/components.js';
+import {
+ readComponentNames,
+ getMissingIntermediateComponentFolderNames,
+} from '@docusaurus/core/lib/commands/swizzle/components.js';
import {normalizeSwizzleConfig} from '@docusaurus/core/lib/commands/swizzle/config.js';
import {wrap, eject} from '@docusaurus/core/lib/commands/swizzle/actions.js';
@@ -50,7 +53,33 @@ console.log('\n');
await fs.remove(toPath);
-let componentNames = await readComponentNames(themePath);
+function filterComponentNames(componentNames) {
+ // TODO temp workaround: non-comps should be forbidden to wrap
+ if (action === 'wrap') {
+ const WrapBlocklist = [
+ 'Layout', // Due to theme-fallback?
+ ];
+
+ return componentNames.filter((componentName) => {
+ const blocked = WrapBlocklist.includes(componentName);
+ if (blocked) {
+ logger.warn(`${componentName} is blocked and will not be wrapped`);
+ }
+ return !blocked;
+ });
+ }
+ return componentNames;
+}
+
+async function getAllComponentNames() {
+ const names = await readComponentNames(themePath);
+ const allNames = names.concat(
+ await getMissingIntermediateComponentFolderNames(names),
+ );
+ return filterComponentNames(allNames);
+}
+
+const componentNames = await getAllComponentNames();
const componentsNotFound = Object.keys(swizzleConfig.components).filter(
(componentName) => !componentNames.includes(componentName),
@@ -67,21 +96,6 @@ Please double-check or clean up these components from the config:
process.exit(1);
}
-// TODO temp workaround: non-comps should be forbidden to wrap
-if (action === 'wrap') {
- const WrapBlocklist = [
- 'Layout', // Due to theme-fallback?
- ];
-
- componentNames = componentNames.filter((componentName) => {
- const blocked = WrapBlocklist.includes(componentName);
- if (blocked) {
- logger.warn(`${componentName} is blocked and will not be wrapped`);
- }
- return !blocked;
- });
-}
-
/**
* @param {string} componentName
*/
diff --git a/website/docs/api/misc/eslint-plugin/README.md b/website/docs/api/misc/eslint-plugin/README.md
index 9d0d2236846c..436355a025e3 100644
--- a/website/docs/api/misc/eslint-plugin/README.md
+++ b/website/docs/api/misc/eslint-plugin/README.md
@@ -15,15 +15,9 @@ npm install --save-dev @docusaurus/eslint-plugin
## Usage
-Add `@docusaurus` to the plugins section of your `.eslintrc` configuration file:
+### Recommended config
-```json title=".eslintrc"
-{
- "plugins": ["@docusaurus"]
-}
-```
-
-Then, you can extend one of the configs (e.g. the `recommended` config):
+Add `plugin:@docusaurus/recommended` to the `extends` section of your `.eslintrc` configuration file:
```json title=".eslintrc"
{
@@ -31,10 +25,15 @@ Then, you can extend one of the configs (e.g. the `recommended` config):
}
```
-Each config contains a set of rules. For more fine-grained control, you can also configure the rules you want to use directly:
+This will enable the `@docusaurus` eslint plugin and use the `recommended` config. See [Supported rules](#supported-rules) below for a list of rules that this will enable.
+
+### Manual config
+
+For more fine-grained control, you can also enable the plugin manually and configure the rules you want to use directly:
```json title=".eslintrc"
{
+ "plugins": ["@docusaurus"],
"rules": {
"@docusaurus/string-literal-i18n-messages": "error",
"@docusaurus/no-untranslated-text": "warn"
@@ -42,12 +41,12 @@ Each config contains a set of rules. For more fine-grained control, you can also
}
```
-## Supported Configs
+## Supported configs
- Recommended: recommended rule set for most Docusaurus sites that should be extended from.
- All: **all** rules enabled. This will change between minor versions, so you should not use this if you want to avoid unexpected breaking changes.
-## Supported Rules
+## Supported rules
| Name | Description | |
| --- | --- | --- |
@@ -63,7 +62,6 @@ Here's an example configuration:
```js title=".eslintrc.js"
module.exports = {
extends: ['plugin:@docusaurus/recommended'],
- plugins: ['@docusaurus'],
rules: {
'@docusaurus/no-untranslated-text': [
'warn',
diff --git a/website/docs/api/plugins/plugin-content-blog.md b/website/docs/api/plugins/plugin-content-blog.md
index 696b4102858d..64b726bb5378 100644
--- a/website/docs/api/plugins/plugin-content-blog.md
+++ b/website/docs/api/plugins/plugin-content-blog.md
@@ -67,6 +67,7 @@ Accepted fields:
| `authorsMapPath` | `string` | `'authors.yml'` | Path to the authors map file, relative to the blog content directory. |
| `feedOptions` | _See below_ | `{type: ['rss', 'atom']}` | Blog feed. |
| `feedOptions.type` | FeedType \| FeedType [] \| 'all' \| null
| **Required** | Type of feed to be generated. Use `null` to disable generation. |
+| `feedOptions.createFeedItems` | CreateFeedItemsFn \| undefined
| `undefined` | An optional function which can be used to transform and / or filter the items in the feed. |
| `feedOptions.title` | `string` | `siteConfig.title` | Title of the feed. |
| `feedOptions.description` | `string` | \`${siteConfig.title} Blog\`
| Description of the feed. |
| `feedOptions.copyright` | `string` | `undefined` | Copyright message. |
@@ -117,6 +118,17 @@ type ReadingTimeFn = (params: {
type FeedType = 'rss' | 'atom' | 'json';
```
+#### `CreateFeedItemsFn` {#CreateFeedItemsFn}
+
+```ts
+type CreateFeedItemsFn = (params: {
+ blogPosts: BlogPost[];
+ siteConfig: DocusaurusConfig;
+ outDir: string;
+ defaultCreateFeedItemsFn: CreateFeedItemsFn;
+}) => Promise;
+```
+
### Example configuration {#ex-config}
You can configure this plugin through preset options or plugin options.
@@ -168,6 +180,14 @@ const config = {
description: '',
copyright: '',
language: undefined,
+ createFeedItems: async (params) => {
+ const {blogPosts, defaultCreateFeedItems, ...rest} = params;
+ return defaultCreateFeedItems({
+ // keep only the 10 most recent blog posts in the feed
+ blogPosts: blogPosts.filter((item, index) => index < 10),
+ ...rest,
+ });
+ },
},
};
```
diff --git a/website/docs/api/plugins/plugin-google-analytics.md b/website/docs/api/plugins/plugin-google-analytics.md
index 1426e6265a1c..98dfc41b924e 100644
--- a/website/docs/api/plugins/plugin-google-analytics.md
+++ b/website/docs/api/plugins/plugin-google-analytics.md
@@ -9,6 +9,16 @@ import APITable from '@site/src/components/APITable';
The default [Google Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) plugin. It is a JavaScript library for measuring how users interact with your website **in the production build**. If you are using Google Analytics 4 you might need to consider using [plugin-google-gtag](./plugin-google-gtag.md) instead.
+:::danger Deprecated
+
+This plugin is **deprecated**, and will become useless on July 1, 2023.
+
+Google is [moving away from Universal Analytics](https://blog.google/products/marketingplatform/analytics/prepare-for-future-with-google-analytics-4/).
+
+If you are still using this plugin with a `UA-*` tracking id, you should create a Google Analytics 4 account as soon as possible, and use [`@docusaurus/plugin-google-gtag`](./plugin-google-gtag.md) instead of this plugin. More details [here](https://github.com/facebook/docusaurus/issues/7221).
+
+:::
+
:::caution production only
This plugin is always inactive in development and **only active in production** to avoid polluting the analytics statistics.
diff --git a/website/docs/api/plugins/plugin-google-tag-manager.md b/website/docs/api/plugins/plugin-google-tag-manager.md
new file mode 100644
index 000000000000..1b9776cc5394
--- /dev/null
+++ b/website/docs/api/plugins/plugin-google-tag-manager.md
@@ -0,0 +1,71 @@
+---
+sidebar_position: 8
+slug: /api/plugins/@docusaurus/plugin-google-tag-manager
+---
+
+# 📦 plugin-google-tag-manager
+
+import APITable from '@site/src/components/APITable';
+
+A plugin for adding [Google Tag Manager (gtm.js)](https://developers.google.com/tag-platform/tag-manager) to a Docusaurus site. Use this plugin in conjunction with the standard [gtag plugin](./plugin-google-gtag.md) for in-depth analysis of how users are using your site.
+
+:::tip
+
+You can use [Google's Tag Assistant](https://tagassistant.google.com/) tool to check if tag manager is set up correctly!
+
+:::
+
+:::caution production only
+
+This plugin is always inactive in development and **only active in production** to avoid polluting the analytics statistics.
+
+:::
+
+## Installation {#installation}
+
+```bash npm2yarn
+npm install --save @docusaurus/plugin-google-tag-manager
+```
+
+:::tip
+
+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.
+
+:::
+
+## Configuration {#configuration}
+
+Accepted fields:
+
+```mdx-code-block
+
+```
+
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| `containerId` | `string` | **Required** | Your Tag Manager container Id (usually starts with `GTM-`). |
+
+```mdx-code-block
+
+```
+
+### Example configuration {#ex-config}
+
+You can configure this plugin through preset options or plugin options.
+
+:::tip
+
+Most Docusaurus users configure this plugin through the preset options.
+
+:::
+
+```js config-tabs
+// Preset Options: googleTagManager
+// Plugin Options: @docusaurus/plugin-google-tag-manager
+
+const config = {
+ containerId: 'GTM-12345',
+};
+```
diff --git a/website/docs/blog.mdx b/website/docs/blog.mdx
index 780a07dbca87..fc5fa935063f 100644
--- a/website/docs/blog.mdx
+++ b/website/docs/blog.mdx
@@ -511,6 +511,17 @@ type BlogOptions = {
description?: string;
copyright: string;
language?: string; // possible values: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
+ /** Allow control over the construction of BlogFeedItems */
+ createFeedItems?: (params: {
+ blogPosts: BlogPost[];
+ siteConfig: DocusaurusConfig;
+ outDir: string;
+ defaultCreateFeedItems: (params: {
+ blogPosts: BlogPost[];
+ siteConfig: DocusaurusConfig;
+ outDir: string;
+ }) => Promise;
+ }) => Promise;
};
};
```
@@ -529,6 +540,14 @@ module.exports = {
feedOptions: {
type: 'all',
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`,
+ createFeedItems: async (params) => {
+ const {blogPosts, defaultCreateFeedItems, ...rest} = params;
+ return defaultCreateFeedItems({
+ // keep only the 10 most recent blog posts in the feed
+ blogPosts: blogPosts.filter((item, index) => index < 10),
+ ...rest,
+ });
+ },
},
// highlight-end
},
diff --git a/website/docs/guides/markdown-features/markdown-features-admonitions.mdx b/website/docs/guides/markdown-features/markdown-features-admonitions.mdx
index 719dd371c93b..bf95ccbf70d0 100644
--- a/website/docs/guides/markdown-features/markdown-features-admonitions.mdx
+++ b/website/docs/guides/markdown-features/markdown-features-admonitions.mdx
@@ -11,7 +11,7 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Admonition from '@theme/Admonition';
-In addition to the basic Markdown syntax, we use [remark-admonitions](https://github.com/elviswolcott/remark-admonitions) alongside MDX to add support for admonitions. Admonitions are wrapped by a set of 3 colons.
+In addition to the basic Markdown syntax, we have a special admonitions syntax by wrapping text with a set of 3 colons, followed by a label denoting its type.
Example:
@@ -107,7 +107,7 @@ Hello world
## Specifying title {#specifying-title}
-You may also specify an optional title
+You may also specify an optional title.
```md
:::note Your Title
@@ -204,3 +204,128 @@ The types that are accepted are the same as above: `note`, `tip`, `danger`, `inf
```
+
+## Customizing admonitions {#customizing-admonitions}
+
+There are two kinds of customizations possible with admonitions: **parsing** and **rendering**.
+
+### Customizing rendering behavior {#customizing-rendering-behavior}
+
+You can customize how each individual admonition type is rendered through [swizzling](../../swizzling.md). You can often achieve your goal through a simple wrapper. For example, in the follow example, we swap out the icon for `info` admonitions only.
+
+```jsx title="src/theme/Admonition.js"
+import React from 'react';
+import Admonition from '@theme-original/Admonition';
+import MyCustomNoteIcon from '@site/static/img/info.svg';
+
+export default function AdmonitionWrapper(props) {
+ if (props.type !== 'info') {
+ return ;
+ }
+ return } {...props} />;
+}
+```
+
+### Customizing parsing behavior {#customizing-parsing-behavior}
+
+Admonitions are implemented with a [Remark plugin](./markdown-features-plugins.mdx). The plugin is designed to be configurable. To customize the Remark plugin for a specific content plugin (docs, blog, pages), pass the options through the `admonitions` key.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ presets: [
+ [
+ '@docusaurus/preset-classic',
+ {
+ docs: {
+ admonitions: {
+ tag: ':::',
+ keywords: ['note', 'tip', 'info', 'caution', 'danger'],
+ extendDefaults: true,
+ },
+ },
+ },
+ ],
+ ],
+};
+```
+
+The plugin accepts the following options:
+
+- `tag`: The tag that encloses the admonition. Defaults to `:::`.
+- `keywords`: An array of keywords that can be used as the type for the admonition.
+- `extendDefaults`: Should the provided options (such as `keywords`) be merged into the existing defaults. Defaults to `false`.
+
+The `keyword` will be passed as the `type` prop of the `Admonition` component.
+
+### Custom admonition type components {#custom-admonition-type-components}
+
+By default, the theme doesn't know what do to with custom admonition keywords such as `:::my-custom-admonition`. It is your responsibility to map each admonition keyword to a React component so that the theme knows how to render them.
+
+If you registered a new admonition type `my-custom-admonition` via the following config:
+
+```js title="docusaurus.config.js"
+module.exports = {
+ // ...
+ presets: [
+ [
+ 'classic',
+ {
+ // ...
+ docs: {
+ admonitions: {
+ tag: ':::',
+ keywords: ['my-custom-admonition'],
+ extendDefaults: true,
+ },
+ },
+ },
+ ],
+ ],
+};
+```
+
+You can provide the corresponding React component for `:::my-custom-admonition` by creating the following file (unfortunately, since it's not a React component file, it's not swizzlable):
+
+```js title="src/theme/Admonition/Types.js"
+import React from 'react';
+import DefaultAdmonitionTypes from '@theme-original/Admonition/Types';
+
+function MyCustomAdmonition(props) {
+ return (
+
+
{props.title}
+
{props.children}
+
+ );
+}
+
+const AdmonitionTypes = {
+ ...DefaultAdmonitionTypes,
+
+ // Add all your custom admonition types here...
+ // You can also override the default ones if you want
+ 'my-custom-admonition': MyCustomAdmonition,
+};
+
+export default AdmonitionTypes;
+```
+
+Now you can use your new admonition keyword in a Markdown file, and it will be parsed and rendered with your custom logic:
+
+```md
+:::my-custom-admonition Custom Admonition
+
+It works!
+
+:::
+```
+
+
+
+:::my-custom-admonition Custom Admonition
+
+It works!
+
+:::
+
+
diff --git a/website/docs/guides/markdown-features/markdown-features-tabs.mdx b/website/docs/guides/markdown-features/markdown-features-tabs.mdx
index 897f54a8a7c0..948c61ef6757 100644
--- a/website/docs/guides/markdown-features/markdown-features-tabs.mdx
+++ b/website/docs/guides/markdown-features/markdown-features-tabs.mdx
@@ -318,3 +318,63 @@ li[role='tab'][data-value='apple'] {
```
:::
+
+## Query string {#query-string}
+
+It is possible to persist the selected tab into the url search parameters. This enables deep linking: the ability to share or bookmark a link to a specific tab, that will be pre-selected when the page loads.
+
+Use the `queryString` prop to enable this feature and define the search param name to use.
+
+```tsx
+// highlight-next-line
+
+
+ Android
+
+
+ iOS
+
+
+```
+
+```mdx-code-block
+
+
+ Android
+ iOS
+
+
+```
+
+As soon as a tab is clicked, a search parameter is added at the end of the url: `?current-os=android` or `?current-os=ios`.
+
+:::tip
+
+`queryString` can be used together with `groupId`.
+
+For convenience, when the `queryString` prop is `true`, the `groupId` value will be used as a fallback.
+
+```tsx
+// highlight-next-line
+
+
+ Android
+
+
+ iOS
+
+
+```
+
+```mdx-code-block
+
+
+ Android
+ iOS
+
+
+```
+
+When the page loads, the tab query string choice will be restored in priority over the `groupId` choice (using `localStorage`).
+
+:::
diff --git a/website/docs/search.md b/website/docs/search.md
index e00e022cfaca..af520241a446 100644
--- a/website/docs/search.md
+++ b/website/docs/search.md
@@ -104,6 +104,12 @@ module.exports = {
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
externalUrlRegex: 'external\\.com|domain\\.com',
+ // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
+ replaceSearchResultPathname: {
+ from: '/docs/', // or as RegExp: /\/docs\//
+ to: '/',
+ },
+
// Optional: Algolia search parameters
searchParameters: {},
diff --git a/website/docs/using-plugins.md b/website/docs/using-plugins.md
index e6f83f13e130..92151e24e0cb 100644
--- a/website/docs/using-plugins.md
+++ b/website/docs/using-plugins.md
@@ -144,8 +144,9 @@ The classic preset is shipped by default to new Docusaurus websites created with
- [`@docusaurus/plugin-content-blog`](./api/plugins/plugin-content-blog.md)
- [`@docusaurus/plugin-content-pages`](./api/plugins/plugin-content-pages.md)
- [`@docusaurus/plugin-debug`](./api/plugins/plugin-debug.md)
-- [`@docusaurus/plugin-google-analytics`](./api/plugins/plugin-google-analytics.md)
- [`@docusaurus/plugin-google-gtag`](./api/plugins/plugin-google-gtag.md)
+- [`@docusaurus/plugin-google-tag-manager`](./api/plugins/plugin-google-tag-manager.md)
+- [`@docusaurus/plugin-google-analytics`](./api/plugins/plugin-google-analytics.md) (**deprecated**)
- [`@docusaurus/plugin-sitemap`](./api/plugins/plugin-sitemap.md)
The classic preset will relay each option entry to the respective plugin/theme.
@@ -172,7 +173,9 @@ module.exports = {
sitemap: {},
// Will be passed to @docusaurus/plugin-google-gtag (only enabled when explicitly specified)
gtag: {},
- // Will be passed to @docusaurus/plugin-google-analytics (only enabled when explicitly specified)
+ // Will be passed to @docusaurus/plugin-google-tag-manager (only enabled when explicitly specified)
+ googleTagManager: {},
+ // DEPRECATED: Will be passed to @docusaurus/plugin-google-analytics (only enabled when explicitly specified)
googleAnalytics: {},
},
],
diff --git a/website/docusaurus.config-blog-only.js b/website/docusaurus.config-blog-only.js
index a5ba77d044f9..26c57909186a 100644
--- a/website/docusaurus.config-blog-only.js
+++ b/website/docusaurus.config-blog-only.js
@@ -41,7 +41,7 @@ module.exports = {
],
],
themeConfig: {
- image: 'img/docusaurus-soc.png',
+ image: 'img/docusaurus-social-card.jpg',
algolia: {
appId: 'X1Z85QJPUV',
apiKey: 'bf7211c161e8205da2f933a02534105a',
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 7cd9f41d4dab..58ccf39005cd 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -395,12 +395,19 @@ const config = {
},
],
},
- image: 'img/docusaurus-soc.png',
+ image: 'img/docusaurus-social-card.jpg',
// metadata: [{name: 'twitter:card', content: 'summary'}],
algolia: {
appId: 'X1Z85QJPUV',
apiKey: 'bf7211c161e8205da2f933a02534105a',
indexName: 'docusaurus-2',
+ replaceSearchResultPathname:
+ isDev || isDeployPreview
+ ? {
+ from: /^\/docs\/next/g,
+ to: '/docs',
+ }
+ : undefined,
},
navbar: {
hideOnScroll: true,
diff --git a/website/package.json b/website/package.json
index 0960dd6ee889..cec615407014 100644
--- a/website/package.json
+++ b/website/package.json
@@ -1,6 +1,6 @@
{
"name": "website",
- "version": "2.2.0",
+ "version": "2.3.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -36,19 +36,19 @@
"dependencies": {
"@crowdin/cli": "^3.7.9",
"@crowdin/crowdin-api-client": "^1.18.2",
- "@docusaurus/core": "2.2.0",
- "@docusaurus/logger": "2.2.0",
- "@docusaurus/plugin-client-redirects": "2.2.0",
- "@docusaurus/plugin-ideal-image": "2.2.0",
- "@docusaurus/plugin-pwa": "2.2.0",
- "@docusaurus/preset-classic": "2.2.0",
- "@docusaurus/remark-plugin-npm2yarn": "2.2.0",
- "@docusaurus/theme-classic": "2.2.0",
- "@docusaurus/theme-common": "2.2.0",
- "@docusaurus/theme-live-codeblock": "2.2.0",
- "@docusaurus/theme-mermaid": "2.2.0",
- "@docusaurus/utils": "2.2.0",
- "@docusaurus/utils-common": "2.2.0",
+ "@docusaurus/core": "2.3.0",
+ "@docusaurus/logger": "2.3.0",
+ "@docusaurus/plugin-client-redirects": "2.3.0",
+ "@docusaurus/plugin-ideal-image": "2.3.0",
+ "@docusaurus/plugin-pwa": "2.3.0",
+ "@docusaurus/preset-classic": "2.3.0",
+ "@docusaurus/remark-plugin-npm2yarn": "2.3.0",
+ "@docusaurus/theme-classic": "2.3.0",
+ "@docusaurus/theme-common": "2.3.0",
+ "@docusaurus/theme-live-codeblock": "2.3.0",
+ "@docusaurus/theme-mermaid": "2.3.0",
+ "@docusaurus/utils": "2.3.0",
+ "@docusaurus/utils-common": "2.3.0",
"@popperjs/core": "^2.11.5",
"@swc/core": "1.2.197",
"clsx": "^1.2.1",
@@ -82,7 +82,7 @@
]
},
"devDependencies": {
- "@docusaurus/eslint-plugin": "2.2.0",
+ "@docusaurus/eslint-plugin": "2.3.0",
"@tsconfig/docusaurus": "^1.0.5",
"@types/jest": "^28.1.4",
"cross-env": "^7.0.3",
diff --git a/website/static/docusaurus-social-card.jpg b/website/static/docusaurus-social-card.jpg
new file mode 100644
index 000000000000..ffcb448210e1
Binary files /dev/null and b/website/static/docusaurus-social-card.jpg differ
diff --git a/website/static/docusaurus-social-card.png b/website/static/docusaurus-social-card.png
new file mode 100644
index 000000000000..342d7cfe8f23
Binary files /dev/null and b/website/static/docusaurus-social-card.png differ
diff --git a/website/static/img/docusaurus-soc.png b/website/static/img/docusaurus-soc.png
deleted file mode 100644
index 488173f0c366..000000000000
Binary files a/website/static/img/docusaurus-soc.png and /dev/null differ
diff --git a/yarn.lock b/yarn.lock
index 4040b681201d..a9731a238835 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3619,11 +3619,6 @@
dependencies:
"@types/react" "*"
-"@types/mermaid@^8.2.9":
- version "8.2.9"
- resolved "https://registry.yarnpkg.com/@types/mermaid/-/mermaid-8.2.9.tgz#1844505dcffcd47703e94628a6200583d35c2c76"
- integrity sha512-f1i8fNoVFVJXedk+R7GcEk4KoOWzWAU3CzFqlVw1qWKktfsataBERezCz1pOdKy8Ec02ZdPQXGM7NU2lPHABYQ==
-
"@types/micromatch@^4.0.2":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/micromatch/-/micromatch-4.0.2.tgz#ce29c8b166a73bf980a5727b1e4a4d099965151d"
@@ -5634,16 +5629,16 @@ command-exists-promise@^2.0.2:
resolved "https://registry.yarnpkg.com/command-exists-promise/-/command-exists-promise-2.0.2.tgz#7beecc4b218299f3c61fa69a4047aa0b36a64a99"
integrity sha512-T6PB6vdFrwnHXg/I0kivM3DqaCGZLjjYSOe0a5WgFKcz1sOnmOeIjnhQPXVXX3QjVbLyTJ85lJkX6lUpukTzaA==
-commander@2, commander@^2.20.0:
- version "2.20.3"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
- integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
-
commander@7, commander@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
+commander@^2.20.0:
+ version "2.20.3"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
+ integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
+
commander@^5.0.0, commander@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
@@ -6273,11 +6268,6 @@ csstype@^3.0.2:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2"
integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==
-d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f"
- integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==
-
"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.0.tgz#15bf96cd9b7333e02eb8de8053d78962eafcff14"
@@ -6285,27 +6275,11 @@ d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0:
dependencies:
internmap "1 - 2"
-d3-axis@1:
- version "1.0.12"
- resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.12.tgz#cdf20ba210cfbb43795af33756886fb3638daac9"
- integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==
-
d3-axis@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322"
integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==
-d3-brush@1:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.6.tgz#b0a22c7372cabec128bdddf9bddc058592f89e9b"
- integrity sha512-7RW+w7HfMCPyZLifTz/UnJmI5kdkXtpCbombUSs8xniAyo0vIbrDzDwUJB6eJOgl9u5DQOt2TQlYumxzD1SvYA==
- dependencies:
- d3-dispatch "1"
- d3-drag "1"
- d3-interpolate "1"
- d3-selection "1"
- d3-transition "1"
-
d3-brush@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c"
@@ -6317,14 +6291,6 @@ d3-brush@3:
d3-selection "3"
d3-transition "3"
-d3-chord@1:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-1.0.6.tgz#309157e3f2db2c752f0280fedd35f2067ccbb15f"
- integrity sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==
- dependencies:
- d3-array "1"
- d3-path "1"
-
d3-chord@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966"
@@ -6332,28 +6298,11 @@ d3-chord@3:
dependencies:
d3-path "1 - 3"
-d3-collection@1:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e"
- integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==
-
-d3-color@1:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a"
- integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==
-
"d3-color@1 - 3", d3-color@3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2"
integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==
-d3-contour@1:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.2.tgz#652aacd500d2264cb3423cee10db69f6f59bead3"
- integrity sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==
- dependencies:
- d3-array "^1.1.1"
-
d3-contour@4:
version "4.0.0"
resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.0.tgz#5a1337c6da0d528479acdb5db54bc81a0ff2ec6b"
@@ -6368,24 +6317,11 @@ d3-delaunay@6:
dependencies:
delaunator "5"
-d3-dispatch@1:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58"
- integrity sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA==
-
"d3-dispatch@1 - 3", d3-dispatch@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e"
integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==
-d3-drag@1:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-1.2.5.tgz#2537f451acd39d31406677b7dc77c82f7d988f70"
- integrity sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w==
- dependencies:
- d3-dispatch "1"
- d3-selection "1"
-
"d3-drag@2 - 3", d3-drag@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba"
@@ -6394,15 +6330,6 @@ d3-drag@1:
d3-dispatch "1 - 3"
d3-selection "3"
-d3-dsv@1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.2.0.tgz#9d5f75c3a5f8abd611f74d3f5847b0d4338b885c"
- integrity sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==
- dependencies:
- commander "2"
- iconv-lite "0.4"
- rw "1"
-
"d3-dsv@1 - 3", d3-dsv@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73"
@@ -6412,23 +6339,11 @@ d3-dsv@1:
iconv-lite "0.6"
rw "1"
-d3-ease@1:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.7.tgz#9a834890ef8b8ae8c558b2fe55bd57f5993b85e2"
- integrity sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ==
-
"d3-ease@1 - 3", d3-ease@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4"
integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==
-d3-fetch@1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.2.0.tgz#15ce2ecfc41b092b1db50abd2c552c2316cf7fc7"
- integrity sha512-yC78NBVcd2zFAyR/HnUiBS7Lf6inSCoWcSxFfw8FYL7ydiqe80SazNwoffcqOfs95XaLo7yebsmQqDKSsXUtvA==
- dependencies:
- d3-dsv "1"
-
d3-fetch@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22"
@@ -6436,16 +6351,6 @@ d3-fetch@3:
dependencies:
d3-dsv "1 - 3"
-d3-force@1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.2.1.tgz#fd29a5d1ff181c9e7f0669e4bd72bdb0e914ec0b"
- integrity sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==
- dependencies:
- d3-collection "1"
- d3-dispatch "1"
- d3-quadtree "1"
- d3-timer "1"
-
d3-force@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4"
@@ -6455,23 +6360,11 @@ d3-force@3:
d3-quadtree "1 - 3"
d3-timer "1 - 3"
-d3-format@1:
- version "1.4.5"
- resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.5.tgz#374f2ba1320e3717eb74a9356c67daee17a7edb4"
- integrity sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ==
-
"d3-format@1 - 3", d3-format@3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641"
integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==
-d3-geo@1:
- version "1.12.1"
- resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.12.1.tgz#7fc2ab7414b72e59fbcbd603e80d9adc029b035f"
- integrity sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg==
- dependencies:
- d3-array "1"
-
d3-geo@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e"
@@ -6479,23 +6372,11 @@ d3-geo@3:
dependencies:
d3-array "2.5.0 - 3"
-d3-hierarchy@1:
- version "1.1.9"
- resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz#2f6bee24caaea43f8dc37545fa01628559647a83"
- integrity sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==
-
d3-hierarchy@3:
version "3.1.2"
resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6"
integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==
-d3-interpolate@1:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987"
- integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==
- dependencies:
- d3-color "1"
-
"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d"
@@ -6503,54 +6384,26 @@ d3-interpolate@1:
dependencies:
d3-color "1 - 3"
-d3-path@1:
- version "1.0.9"
- resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf"
- integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==
-
"d3-path@1 - 3", d3-path@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e"
integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w==
-d3-polygon@1:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-1.0.6.tgz#0bf8cb8180a6dc107f518ddf7975e12abbfbd38e"
- integrity sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ==
-
d3-polygon@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398"
integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==
-d3-quadtree@1:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-1.0.7.tgz#ca8b84df7bb53763fe3c2f24bd435137f4e53135"
- integrity sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA==
-
"d3-quadtree@1 - 3", d3-quadtree@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f"
integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==
-d3-random@1:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-1.1.2.tgz#2833be7c124360bf9e2d3fd4f33847cfe6cab291"
- integrity sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ==
-
d3-random@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4"
integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==
-d3-scale-chromatic@1:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.5.0.tgz#54e333fc78212f439b14641fb55801dd81135a98"
- integrity sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg==
- dependencies:
- d3-color "1"
- d3-interpolate "1"
-
d3-scale-chromatic@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#15b4ceb8ca2bb0dcb6d1a641ee03d59c3b62376a"
@@ -6559,18 +6412,6 @@ d3-scale-chromatic@3:
d3-color "1 - 3"
d3-interpolate "1 - 3"
-d3-scale@2:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f"
- integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==
- dependencies:
- d3-array "^1.2.0"
- d3-collection "1"
- d3-format "1"
- d3-interpolate "1"
- d3-time "1"
- d3-time-format "2"
-
d3-scale@4:
version "4.0.2"
resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396"
@@ -6582,23 +6423,11 @@ d3-scale@4:
d3-time "2.1.1 - 3"
d3-time-format "2 - 4"
-d3-selection@1, d3-selection@^1.1.0:
- version "1.4.2"
- resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.2.tgz#dcaa49522c0dbf32d6c1858afc26b6094555bc5c"
- integrity sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg==
-
"d3-selection@2 - 3", d3-selection@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31"
integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==
-d3-shape@1:
- version "1.3.7"
- resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7"
- integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==
- dependencies:
- d3-path "1"
-
d3-shape@3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.1.0.tgz#c8a495652d83ea6f524e482fca57aa3f8bc32556"
@@ -6606,13 +6435,6 @@ d3-shape@3:
dependencies:
d3-path "1 - 3"
-d3-time-format@2:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.3.0.tgz#107bdc028667788a8924ba040faf1fbccd5a7850"
- integrity sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==
- dependencies:
- d3-time "1"
-
"d3-time-format@2 - 4", d3-time-format@4:
version "4.1.0"
resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a"
@@ -6620,11 +6442,6 @@ d3-time-format@2:
dependencies:
d3-time "1 - 3"
-d3-time@1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1"
- integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA==
-
"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975"
@@ -6632,28 +6449,11 @@ d3-time@1:
dependencies:
d3-array "2 - 3"
-d3-timer@1:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5"
- integrity sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==
-
"d3-timer@1 - 3", d3-timer@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0"
integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==
-d3-transition@1:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-1.3.2.tgz#a98ef2151be8d8600543434c1ca80140ae23b398"
- integrity sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA==
- dependencies:
- d3-color "1"
- d3-dispatch "1"
- d3-ease "1"
- d3-interpolate "1"
- d3-selection "^1.1.0"
- d3-timer "1"
-
"d3-transition@2 - 3", d3-transition@3:
version "3.0.1"
resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f"
@@ -6665,22 +6465,6 @@ d3-transition@1:
d3-interpolate "1 - 3"
d3-timer "1 - 3"
-d3-voronoi@1:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.4.tgz#dd3c78d7653d2bb359284ae478645d95944c8297"
- integrity sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==
-
-d3-zoom@1:
- version "1.8.3"
- resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-1.8.3.tgz#b6a3dbe738c7763121cd05b8a7795ffe17f4fc0a"
- integrity sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ==
- dependencies:
- d3-dispatch "1"
- d3-drag "1"
- d3-interpolate "1"
- d3-selection "1"
- d3-transition "1"
-
d3-zoom@3:
version "3.0.0"
resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3"
@@ -6692,47 +6476,10 @@ d3-zoom@3:
d3-selection "2 - 3"
d3-transition "2 - 3"
-d3@^5.14:
- version "5.16.0"
- resolved "https://registry.yarnpkg.com/d3/-/d3-5.16.0.tgz#9c5e8d3b56403c79d4ed42fbd62f6113f199c877"
- integrity sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw==
- dependencies:
- d3-array "1"
- d3-axis "1"
- d3-brush "1"
- d3-chord "1"
- d3-collection "1"
- d3-color "1"
- d3-contour "1"
- d3-dispatch "1"
- d3-drag "1"
- d3-dsv "1"
- d3-ease "1"
- d3-fetch "1"
- d3-force "1"
- d3-format "1"
- d3-geo "1"
- d3-hierarchy "1"
- d3-interpolate "1"
- d3-path "1"
- d3-polygon "1"
- d3-quadtree "1"
- d3-random "1"
- d3-scale "2"
- d3-scale-chromatic "1"
- d3-selection "1"
- d3-shape "1"
- d3-time "1"
- d3-time-format "2"
- d3-timer "1"
- d3-transition "1"
- d3-voronoi "1"
- d3-zoom "1"
-
-d3@^7.0.0:
- version "7.6.1"
- resolved "https://registry.yarnpkg.com/d3/-/d3-7.6.1.tgz#b21af9563485ed472802f8c611cc43be6c37c40c"
- integrity sha512-txMTdIHFbcpLx+8a0IFhZsbp+PfBBPt8yfbmukZTQFroKuFqIwqswF0qE5JXWefylaAVpSXFoKm3yP+jpNLFLw==
+d3@^7.0.0, d3@^7.7.0:
+ version "7.8.2"
+ resolved "https://registry.yarnpkg.com/d3/-/d3-7.8.2.tgz#2bdb3c178d095ae03b107a18837ae049838e372d"
+ integrity sha512-WXty7qOGSHb7HR7CfOzwN1Gw04MUOzN8qh9ZUsvwycIMb4DYMpY9xczZ6jUorGtO6bR9BPMPaueIKwiDxu9uiQ==
dependencies:
d3-array "3"
d3-axis "3"
@@ -6765,23 +6512,13 @@ d3@^7.0.0:
d3-transition "3"
d3-zoom "3"
-dagre-d3@^0.6.4:
- version "0.6.4"
- resolved "https://registry.yarnpkg.com/dagre-d3/-/dagre-d3-0.6.4.tgz#0728d5ce7f177ca2337df141ceb60fbe6eeb7b29"
- integrity sha512-e/6jXeCP7/ptlAM48clmX4xTZc5Ek6T6kagS7Oz2HrYSdqcLZFLqpAfh7ldbZRFfxCZVyh61NEPR08UQRVxJzQ==
+dagre-d3-es@7.0.6:
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/dagre-d3-es/-/dagre-d3-es-7.0.6.tgz#8cab465ff95aca8a1ca2292d07e1fb31b5db83f2"
+ integrity sha512-CaaE/nZh205ix+Up4xsnlGmpog5GGm81Upi2+/SBHxwNwrccBb3K51LzjZ1U6hgvOlAEUsVWf1xSTzCyKpJ6+Q==
dependencies:
- d3 "^5.14"
- dagre "^0.8.5"
- graphlib "^2.1.8"
- lodash "^4.17.15"
-
-dagre@^0.8.5:
- version "0.8.5"
- resolved "https://registry.yarnpkg.com/dagre/-/dagre-0.8.5.tgz#ba30b0055dac12b6c1fcc247817442777d06afee"
- integrity sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==
- dependencies:
- graphlib "^2.1.8"
- lodash "^4.17.15"
+ d3 "^7.7.0"
+ lodash-es "^4.17.21"
damerau-levenshtein@^1.0.8:
version "1.0.8"
@@ -7148,10 +6885,10 @@ domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3:
dependencies:
domelementtype "^2.3.0"
-dompurify@2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.0.tgz#c9c88390f024c2823332615c9e20a453cf3825dd"
- integrity sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA==
+dompurify@2.4.1:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.1.tgz#f9cb1a275fde9af6f2d0a2644ef648dd6847b631"
+ integrity sha512-ewwFzHzrrneRjxzmK6oVz/rZn9VWspGFRDb4/rRtIsM1n36t9AKma/ye8syCpcw+XJ25kOK/hOG7t1j2I2yBqA==
domutils@^2.5.2, domutils@^2.8.0:
version "2.8.0"
@@ -8559,13 +8296,6 @@ grapheme-splitter@^1.0.4:
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
-graphlib@^2.1.8:
- version "2.1.8"
- resolved "https://registry.yarnpkg.com/graphlib/-/graphlib-2.1.8.tgz#5761d414737870084c92ec7b5dbcb0592c9d35da"
- integrity sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==
- dependencies:
- lodash "^4.17.15"
-
gray-matter@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798"
@@ -9084,7 +8814,7 @@ husky@^8.0.1:
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9"
integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==
-iconv-lite@0.4, iconv-lite@0.4.24, iconv-lite@^0.4.24:
+iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@@ -10327,9 +10057,9 @@ json-stringify-safe@^5.0.1:
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
json5@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
- integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
+ integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
dependencies:
minimist "^1.2.0"
@@ -10654,6 +10384,11 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
+lodash-es@^4.17.21:
+ version "4.17.21"
+ resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
+ integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
+
lodash.curry@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170"
@@ -11019,20 +10754,21 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
-mermaid@^9.1.1:
- version "9.1.7"
- resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-9.1.7.tgz#e24de9b2d36c8cb25a09d72ffce966941b24bd6e"
- integrity sha512-MRVHXy5FLjnUQUG7YS3UN9jEN6FXCJbFCXVGJQjVIbiR6Vhw0j/6pLIjqsiah9xoHmQU6DEaKOvB3S1g/1nBPA==
+mermaid@^9.2.2:
+ version "9.3.0"
+ resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-9.3.0.tgz#8bd7c4a44b53e4e85c53a0a474442e9c273494ae"
+ integrity sha512-mGl0BM19TD/HbU/LmlaZbjBi//tojelg8P/mxD6pPZTAYaI+VawcyBdqRsoUHSc7j71PrMdJ3HBadoQNdvP5cg==
dependencies:
"@braintree/sanitize-url" "^6.0.0"
d3 "^7.0.0"
- dagre "^0.8.5"
- dagre-d3 "^0.6.4"
- dompurify "2.4.0"
- graphlib "^2.1.8"
+ dagre-d3-es "7.0.6"
+ dompurify "2.4.1"
khroma "^2.0.0"
- moment-mini "2.24.0"
- stylis "^4.0.10"
+ lodash-es "^4.17.21"
+ moment-mini "^2.24.0"
+ non-layered-tidy-tree-layout "^2.0.2"
+ stylis "^4.1.2"
+ uuid "^9.0.0"
methods@~1.1.2:
version "1.1.2"
@@ -11171,9 +10907,9 @@ minimist-options@4.1.0:
kind-of "^6.0.3"
minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6:
- version "1.2.6"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
- integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
+ integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
minipass-collect@^1.0.2:
version "1.0.2"
@@ -11302,10 +11038,10 @@ modify-values@^1.0.0:
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==
-moment-mini@2.24.0:
- version "2.24.0"
- resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.24.0.tgz#fa68d98f7fe93ae65bf1262f6abb5fb6983d8d18"
- integrity sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ==
+moment-mini@^2.24.0:
+ version "2.29.4"
+ resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.29.4.tgz#cbbcdc58ce1b267506f28ea6668dbe060a32758f"
+ integrity sha512-uhXpYwHFeiTbY9KSgPPRoo1nt8OxNVdMVoTBYHfSEKeRkIkwGpO+gERmhuhBtzfaeOyTkykSrm2+noJBgqt3Hg==
mrmime@^1.0.0:
version "1.0.1"
@@ -11510,6 +11246,11 @@ node-releases@^2.0.5:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==
+non-layered-tidy-tree-layout@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz#57d35d13c356643fc296a55fb11ac15e74da7804"
+ integrity sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==
+
nopt@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"
@@ -14824,7 +14565,7 @@ stylelint@^14.9.1:
v8-compile-cache "^2.3.0"
write-file-atomic "^4.0.1"
-stylis@^4.0.10:
+stylis@^4.1.2:
version "4.1.3"
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7"
integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==
@@ -15748,6 +15489,11 @@ use-latest@^1.2.1:
dependencies:
use-isomorphic-layout-effect "^1.1.1"
+use-sync-external-store@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
+ integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
+
use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
@@ -15778,6 +15524,11 @@ uuid@^8.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
+uuid@^9.0.0:
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
+ integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==
+
v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"