From c98fb110637e337d8e748ea8cd9ed63773a95559 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 11:47:23 +0100 Subject: [PATCH 01/17] feat(core): promote `future.experimental_faster` to `future.faster` + add `future.v4.fasterByDefault` flag Stabilize the Docusaurus Faster config by removing the `experimental_` prefix. Add a `fasterByDefault` v4 future flag that enables all faster features by default when `v4: true` is used, allowing granular overrides. Init templates now include `@docusaurus/faster` as a dependency since they use `v4: true`. Co-Authored-By: Claude Opus 4.6 --- .../templates/classic-typescript/package.json | 1 + .../templates/classic/package.json | 1 + .../docusaurus-bundler/src/currentBundler.ts | 6 +- .../src/loaders/__tests__/jsLoader.test.ts | 10 +- .../src/loaders/jsLoader.ts | 8 +- .../src/index.ts | 2 +- .../__snapshots__/index.test.ts.snap | 4700 +++-------------- .../src/__tests__/index.test.ts | 2 +- .../src/index.ts | 2 +- .../src/index.ts | 2 +- packages/docusaurus-plugin-pwa/src/index.ts | 2 +- packages/docusaurus-types/src/config.d.ts | 5 +- .../src/commands/build/buildLocale.ts | 2 +- .../docusaurus/src/commands/start/webpack.ts | 2 +- .../__snapshots__/config.test.ts.snap | 150 +- .../__tests__/__snapshots__/site.test.ts.snap | 180 +- .../server/__tests__/configValidation.test.ts | 310 +- .../src/server/__tests__/siteMessages.test.ts | 2 +- .../docusaurus/src/server/configValidation.ts | 93 +- .../src/server/plugins/synthetic.ts | 2 +- .../docusaurus/src/server/siteMessages.ts | 2 +- packages/docusaurus/src/ssg/ssgExecutor.ts | 2 +- packages/docusaurus/src/ssg/ssgParams.ts | 2 +- packages/docusaurus/src/webpack/base.ts | 2 +- packages/docusaurus/src/webpack/server.ts | 2 +- website/docs/api/docusaurus.config.js.mdx | 6 +- website/docusaurus.config.ts | 2 +- 27 files changed, 1098 insertions(+), 4402 deletions(-) diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index a6b52a1aa5ed..aa4d545ffeae 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -16,6 +16,7 @@ }, "dependencies": { "@docusaurus/core": "3.9.2", + "@docusaurus/faster": "3.9.2", "@docusaurus/preset-classic": "3.9.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", diff --git a/packages/create-docusaurus/templates/classic/package.json b/packages/create-docusaurus/templates/classic/package.json index 549f25cff334..1152abb056d8 100644 --- a/packages/create-docusaurus/templates/classic/package.json +++ b/packages/create-docusaurus/templates/classic/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "@docusaurus/core": "3.9.2", + "@docusaurus/faster": "3.9.2", "@docusaurus/preset-classic": "3.9.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", diff --git a/packages/docusaurus-bundler/src/currentBundler.ts b/packages/docusaurus-bundler/src/currentBundler.ts index d0bf5607e934..5e19894c8517 100644 --- a/packages/docusaurus-bundler/src/currentBundler.ts +++ b/packages/docusaurus-bundler/src/currentBundler.ts @@ -16,15 +16,15 @@ import type {CurrentBundler, DocusaurusConfig} from '@docusaurus/types'; // We inject a site config slice because the Rspack flag might change place type SiteConfigSlice = { future: { - experimental_faster: Pick< - DocusaurusConfig['future']['experimental_faster'], + faster: Pick< + DocusaurusConfig['future']['faster'], 'rspackBundler' >; }; }; function isRspack(siteConfig: SiteConfigSlice): boolean { - return siteConfig.future.experimental_faster.rspackBundler; + return siteConfig.future.faster.rspackBundler; } export async function getCurrentBundler({ diff --git a/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts b/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts index a3c7ea43e492..389cce042c68 100644 --- a/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts +++ b/packages/docusaurus-bundler/src/loaders/__tests__/jsLoader.test.ts @@ -25,8 +25,8 @@ describe('createJsLoaderFactory', () => { webpack: siteConfig?.webpack, future: fromPartial({ ...siteConfig?.future, - experimental_faster: fromPartial({ - ...siteConfig?.future?.experimental_faster, + faster: fromPartial({ + ...siteConfig?.future?.faster, }), }), }, @@ -71,7 +71,7 @@ describe('createJsLoaderFactory', () => { await expect(() => testJsLoaderFactory({ future: { - experimental_faster: { + faster: { swcJsLoader: true, }, }, @@ -82,10 +82,10 @@ describe('createJsLoaderFactory', () => { }, }), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "You can't use siteConfig.webpack.jsLoader and siteConfig.future.experimental_faster.swcJsLoader at the same time. + "You can't use siteConfig.webpack.jsLoader and siteConfig.future.faster.swcJsLoader at the same time. To avoid any configuration ambiguity, you must make an explicit choice: - If you want to use Docusaurus Faster and SWC (recommended), remove siteConfig.webpack.jsLoader - - If you want to use a custom JS loader, use siteConfig.future.experimental_faster.swcJsLoader: false" + - If you want to use a custom JS loader, use siteConfig.future.faster.swcJsLoader: false" `); }); diff --git a/packages/docusaurus-bundler/src/loaders/jsLoader.ts b/packages/docusaurus-bundler/src/loaders/jsLoader.ts index 51d749ce640a..b60f817a1559 100644 --- a/packages/docusaurus-bundler/src/loaders/jsLoader.ts +++ b/packages/docusaurus-bundler/src/loaders/jsLoader.ts @@ -56,19 +56,19 @@ export async function createJsLoaderFactory({ siteConfig: { webpack?: DocusaurusConfig['webpack']; future: { - experimental_faster: DocusaurusConfig['future']['experimental_faster']; + faster: DocusaurusConfig['future']['faster']; }; }; }): Promise { const currentBundler = await getCurrentBundler({siteConfig}); - const isSWCLoader = siteConfig.future.experimental_faster.swcJsLoader; + const isSWCLoader = siteConfig.future.faster.swcJsLoader; if (isSWCLoader) { if (siteConfig.webpack?.jsLoader) { throw new Error( - `You can't use siteConfig.webpack.jsLoader and siteConfig.future.experimental_faster.swcJsLoader at the same time. + `You can't use siteConfig.webpack.jsLoader and siteConfig.future.faster.swcJsLoader at the same time. To avoid any configuration ambiguity, you must make an explicit choice: - If you want to use Docusaurus Faster and SWC (recommended), remove siteConfig.webpack.jsLoader -- If you want to use a custom JS loader, use siteConfig.future.experimental_faster.swcJsLoader: false`, +- If you want to use a custom JS loader, use siteConfig.future.faster.swcJsLoader: false`, ); } return currentBundler.name === 'rspack' diff --git a/packages/docusaurus-plugin-content-blog/src/index.ts b/packages/docusaurus-plugin-content-blog/src/index.ts index 53fe1a5a05f0..25a84cfc35e3 100644 --- a/packages/docusaurus-plugin-content-blog/src/index.ts +++ b/packages/docusaurus-plugin-content-blog/src/index.ts @@ -119,7 +119,7 @@ export default async function pluginContentBlog( const mdxLoaderItem = await createMDXLoaderItem({ useCrossCompilerCache: - siteConfig.future.experimental_faster.mdxCrossCompilerCache, + siteConfig.future.faster.mdxCrossCompilerCache, admonitions, remarkPlugins, rehypePlugins, diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap index c10fc2b03f0e..5db8b61f4e4d 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap @@ -453,1958 +453,406 @@ exports[`simple website content 5`] = ` } `; -exports[`simple website content: data 1`] = ` +exports[`site with custom sidebar items generator sidebar is autogenerated according to a custom sidebarItemsGenerator 1`] = ` { - "site-docs-custom-last-update-md-b8d.json": { - "description": "Custom last update", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "last_update": { - "author": "Custom Author (processed by parseFrontMatter)", - "date": "1/1/2000", - }, - "title": "Custom Last Update", - }, - "id": "customLastUpdate", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/customLastUpdate", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/customLastUpdate", - "source": "@site/docs/customLastUpdate.md", - "sourceDirName": ".", - "tags": [], - "title": "Custom Last Update", - "unlisted": false, - "version": "current", - }, - "site-docs-doc-draft-md-584.json": { - "description": "This is a draft document", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "draft": true, - }, - "id": "doc-draft", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/doc-draft", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/doc-draft", - "source": "@site/docs/doc-draft.md", - "sourceDirName": ".", - "tags": [], - "title": "doc-draft", - "unlisted": false, - "version": "current", - }, - "site-docs-doc-unlisted-md-80b.json": { - "description": "This is an unlisted document", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "unlisted": true, - }, - "id": "doc-unlisted", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/foo/bazSlug.html", - "title": "baz pagination_label", - }, - "permalink": "/docs/doc-unlisted", - "previous": { - "permalink": "/docs/foo/bar", - "title": "Bar", + "defaultSidebar": [ + { + "id": "API/api-overview", + "type": "doc", }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/doc-unlisted", - "source": "@site/docs/doc-unlisted.md", - "sourceDirName": ".", - "tags": [], - "title": "doc-unlisted", - "unlisted": false, - "version": "current", - }, - "site-docs-doc-with-space-md-e90.json": { - "description": "", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "doc with space", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/doc with space", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/doc with space", - "source": "@site/docs/doc with space.md", - "sourceDirName": ".", - "tags": [], - "title": "Hoo hoo, if this path tricks you...", - "unlisted": false, - "version": "current", - }, - "site-docs-foo-bar-md-8c2.json": { - "description": "This is custom description", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "description": "This is custom description", - "id": "bar", - "pagination_next": null, - "pagination_prev": null, - "title": "Bar", + { + "id": "API/api-end", + "type": "doc", }, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/foo/bar", - "previous": undefined, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/bar", - "source": "@site/docs/foo/bar.md", - "sourceDirName": "foo", - "tags": [], - "title": "Bar", - "unlisted": false, - "version": "current", - }, - "site-docs-foo-baz-md-a69.json": { - "description": "Images", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "baz", - "pagination_label": "baz pagination_label", - "slug": "bazSlug.html", - "tags": [ - "tag 1", - "globalTag1", - "tag-1", + ], +} +`; + +exports[`site with custom sidebar items generator sidebarItemsGenerator can wrap/enhance/sort/reverse the default sidebar generator 1`] = ` +{ + "defaultSidebar": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/api-end", + "type": "doc", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Extension APIs/Theme API", + "type": "doc", + }, + { + "id": "API/Extension APIs/Plugin API", + "type": "doc", + }, + ], + "label": "Extension APIs (label from _category_.yml)", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Core APIs/Server API", + "type": "doc", + }, + { + "id": "API/Core APIs/Client API", + "type": "doc", + }, + ], + "label": "Core APIs", + "link": undefined, + "type": "category", + }, { - "label": "tag 2", - "permalink": "tag2-custom-permalink", + "id": "API/api-overview", + "type": "doc", }, ], - "title": "baz", - }, - "id": "foo/baz", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/unlisted-category/", - "title": "unlisted-category-index", - }, - "permalink": "/docs/foo/bazSlug.html", - "previous": { - "permalink": "/docs/doc-unlisted", - "title": "doc-unlisted", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/bazSlug.html", - "source": "@site/docs/foo/baz.md", - "sourceDirName": "foo", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "tag 1", - "permalink": "/docs/tags/tag-1", - }, - { - "description": "Global Tag 1 description", - "inline": false, - "label": "Global Tag 1 label", - "permalink": "/docs/tags/global-tag-1-permalink", - }, - { - "description": undefined, - "inline": true, - "label": "tag-1", - "permalink": "/docs/tags/tag-1", - }, - { - "description": undefined, - "inline": true, - "label": "tag 2", - "permalink": "/docs/tags/tag2-custom-permalink", - }, - ], - "title": "baz", - "unlisted": false, - "version": "current", - }, - "site-docs-heading-as-title-md-c6d.json": { - "description": "", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "headingAsTitle", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/", - "title": "Hello sidebar_label", - }, - "permalink": "/docs/headingAsTitle", - "previous": { - "permalink": "/docs/rootTryToEscapeSlug", - "title": "rootTryToEscapeSlug", + "label": "API (label from _category_.json)", + "link": undefined, + "type": "category", }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/headingAsTitle", - "source": "@site/docs/headingAsTitle.md", - "sourceDirName": ".", - "tags": [], - "title": "My heading as title", - "unlisted": false, - "version": "current", - }, - "site-docs-hello-md-9df.json": { - "description": "Hi, Endilie here :)", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "hello", - "sidebar_label": "Hello sidebar_label", - "slug": "/", - "tags": [ - "tag-1", - "tag 3", + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "Guides/guide5", + "type": "doc", + }, + { + "id": "Guides/guide4", + "type": "doc", + }, + { + "id": "Guides/guide3", + "type": "doc", + }, + { + "id": "Guides/guide2.5", + "type": "doc", + }, + { + "id": "Guides/guide2", + "type": "doc", + }, + { + "id": "Guides/guide1", + "type": "doc", + }, ], - "title": "Hello, World !", - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/", - "previous": { - "permalink": "/docs/headingAsTitle", - "title": "My heading as title", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/docs/hello.md", - "sourceDirName": ".", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "tag-1", - "permalink": "/docs/tags/tag-1", - }, - { - "description": undefined, - "inline": true, - "label": "tag 3", - "permalink": "/docs/tags/tag-3", - }, - ], - "title": "Hello, World !", - "unlisted": false, - "version": "current", - }, - "site-docs-ipsum-md-c61.json": { - "description": "Lorem ipsum.", - "draft": false, - "editUrl": null, - "frontMatter": { - "custom_edit_url": null, - "pagination_next": "doc-unlisted", - }, - "id": "ipsum", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/doc-unlisted", - "title": "doc-unlisted", - }, - "permalink": "/docs/ipsum", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/ipsum", - "source": "@site/docs/ipsum.md", - "sourceDirName": ".", - "tags": [], - "title": "ipsum", - "unlisted": false, - "version": "current", - }, - "site-docs-last-update-author-only-md-352.json": { - "description": "Only custom author, so it will still use the date from Git", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "last_update": { - "author": "Custom Author (processed by parseFrontMatter)", - }, - "title": "Last Update Author Only", + "label": "Guides", + "link": undefined, + "type": "category", }, - "id": "lastUpdateAuthorOnly", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/lastUpdateAuthorOnly", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/lastUpdateAuthorOnly", - "source": "@site/docs/lastUpdateAuthorOnly.md", - "sourceDirName": ".", - "tags": [], - "title": "Last Update Author Only", - "unlisted": false, - "version": "current", - }, - "site-docs-last-update-date-only-md-987.json": { - "description": "Only custom date, so it will still use the author from Git", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "last_update": { - "date": "1/1/2000", - }, - "title": "Last Update Date Only", + { + "id": "installation", + "type": "doc", }, - "id": "lastUpdateDateOnly", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/lastUpdateDateOnly", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/lastUpdateDateOnly", - "source": "@site/docs/lastUpdateDateOnly.md", - "sourceDirName": ".", - "tags": [], - "title": "Last Update Date Only", - "unlisted": false, - "version": "current", - }, - "site-docs-lorem-md-b27.json": { - "description": "Lorem ipsum.", - "draft": false, - "editUrl": "https://github.com/customUrl/docs/lorem.md", - "frontMatter": { - "custom_edit_url": "https://github.com/customUrl/docs/lorem.md", - "unrelated_front_matter": "won't be part of metadata", + { + "id": "getting-started", + "type": "doc", }, - "id": "lorem", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/lorem", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/lorem", - "source": "@site/docs/lorem.md", - "sourceDirName": ".", - "tags": [], - "title": "lorem", - "unlisted": false, - "version": "current", - }, - "site-docs-root-absolute-slug-md-db5.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "pagination_next": "headingAsTitle", - "pagination_prev": "foo/baz", - "slug": "/rootAbsoluteSlug", + ], +} +`; + +exports[`site with custom sidebar items generator sidebarItemsGenerator is called with appropriate data 1`] = ` +{ + "categoriesMetadata": { + "3-API": { + "label": "API (label from _category_.json)", }, - "id": "rootAbsoluteSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/headingAsTitle", - "title": "My heading as title", + "3-API/02_Extension APIs": { + "label": "Extension APIs (label from _category_.yml)", }, - "permalink": "/docs/rootAbsoluteSlug", - "previous": { - "permalink": "/docs/foo/bazSlug.html", - "title": "baz pagination_label", + "Guides": { + "position": 2, }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/rootAbsoluteSlug", - "source": "@site/docs/rootAbsoluteSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootAbsoluteSlug", - "unlisted": false, - "version": "current", }, - "site-docs-root-relative-slug-md-3dd.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "pagination_next": "headingAsTitle", - "pagination_prev": "foo/baz", - "slug": "rootRelativeSlug", - }, - "id": "rootRelativeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/headingAsTitle", - "title": "My heading as title", + "defaultSidebarItemsGenerator": [Function], + "docs": [ + { + "frontMatter": {}, + "id": "API/Core APIs/Client API", + "sidebarPosition": 0, + "source": "@site/docs/3-API/01_Core APIs/0 --- Client API.md", + "sourceDirName": "3-API/01_Core APIs", + "title": "Client API", }, - "permalink": "/docs/rootRelativeSlug", - "previous": { - "permalink": "/docs/foo/bazSlug.html", - "title": "baz pagination_label", + { + "frontMatter": {}, + "id": "API/Core APIs/Server API", + "sidebarPosition": 1, + "source": "@site/docs/3-API/01_Core APIs/1 --- Server API.md", + "sourceDirName": "3-API/01_Core APIs", + "title": "Server API", }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/rootRelativeSlug", - "source": "@site/docs/rootRelativeSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootRelativeSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-root-resolved-slug-md-4d1.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "pagination_next": "headingAsTitle", - "pagination_prev": "foo/baz", - "slug": "./hey/ho/../rootResolvedSlug", + { + "frontMatter": {}, + "id": "API/Extension APIs/Plugin API", + "sidebarPosition": 0, + "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", + "sourceDirName": "3-API/02_Extension APIs", + "title": "Plugin API", }, - "id": "rootResolvedSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/headingAsTitle", - "title": "My heading as title", + { + "frontMatter": {}, + "id": "API/Extension APIs/Theme API", + "sidebarPosition": 1, + "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", + "sourceDirName": "3-API/02_Extension APIs", + "title": "Theme API", }, - "permalink": "/docs/hey/rootResolvedSlug", - "previous": { - "permalink": "/docs/foo/bazSlug.html", - "title": "baz pagination_label", + { + "frontMatter": {}, + "id": "API/api-end", + "sidebarPosition": 3, + "source": "@site/docs/3-API/03_api-end.md", + "sourceDirName": "3-API", + "title": "API End", }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/hey/rootResolvedSlug", - "source": "@site/docs/rootResolvedSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootResolvedSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-root-try-to-escape-slug-md-9ee.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "pagination_next": "headingAsTitle", - "pagination_prev": "foo/baz", - "slug": "../../../../../../../../rootTryToEscapeSlug", + { + "frontMatter": {}, + "id": "API/api-overview", + "sidebarPosition": 0, + "source": "@site/docs/3-API/00_api-overview.md", + "sourceDirName": "3-API", + "title": "API Overview", }, - "id": "rootTryToEscapeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/headingAsTitle", - "title": "My heading as title", + { + "frontMatter": { + "id": "guide1", + "sidebar_position": 1, + }, + "id": "Guides/guide1", + "sidebarPosition": 1, + "source": "@site/docs/Guides/z-guide1.md", + "sourceDirName": "Guides", + "title": "Guide 1", }, - "permalink": "/docs/rootTryToEscapeSlug", - "previous": { - "permalink": "/docs/foo/bazSlug.html", - "title": "baz pagination_label", + { + "frontMatter": { + "id": "guide2", + }, + "id": "Guides/guide2", + "sidebarPosition": 2, + "source": "@site/docs/Guides/02-guide2.md", + "sourceDirName": "Guides", + "title": "Guide 2", }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/rootTryToEscapeSlug", - "source": "@site/docs/rootTryToEscapeSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootTryToEscapeSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-absolute-slug-md-4e8.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/absoluteSlug", + { + "frontMatter": { + "id": "guide2.5", + "sidebar_position": 2.5, + }, + "id": "Guides/guide2.5", + "sidebarPosition": 2.5, + "source": "@site/docs/Guides/0-guide2.5.md", + "sourceDirName": "Guides", + "title": "Guide 2.5", }, - "id": "slugs/absoluteSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/absoluteSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/absoluteSlug", - "source": "@site/docs/slugs/absoluteSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "absoluteSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-relative-slug-md-d1c.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "relativeSlug", + { + "frontMatter": { + "id": "guide3", + "sidebar_position": 3, + }, + "id": "Guides/guide3", + "sidebarPosition": 3, + "source": "@site/docs/Guides/guide3.md", + "sourceDirName": "Guides", + "title": "Guide 3", }, - "id": "slugs/relativeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/slugs/relativeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/slugs/relativeSlug", - "source": "@site/docs/slugs/relativeSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "relativeSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-resolved-slug-md-02b.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "./hey/ho/../resolvedSlug", - }, - "id": "slugs/resolvedSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/slugs/hey/resolvedSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/slugs/hey/resolvedSlug", - "source": "@site/docs/slugs/resolvedSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "resolvedSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-try-to-escape-slug-md-70d.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "../../../../../../../../tryToEscapeSlug", + { + "frontMatter": { + "id": "guide4", + }, + "id": "Guides/guide4", + "sidebarPosition": undefined, + "source": "@site/docs/Guides/a-guide4.md", + "sourceDirName": "Guides", + "title": "Guide 4", }, - "id": "slugs/tryToEscapeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/tryToEscapeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/tryToEscapeSlug", - "source": "@site/docs/slugs/tryToEscapeSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "tryToEscapeSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-unlisted-category-index-md-efa.json": { - "description": "This is an unlisted category index", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "unlisted-category-index", - "unlisted": true, + { + "frontMatter": { + "id": "guide5", + }, + "id": "Guides/guide5", + "sidebarPosition": undefined, + "source": "@site/docs/Guides/b-guide5.md", + "sourceDirName": "Guides", + "title": "Guide 5", }, - "id": "unlisted-category/unlisted-category-index", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/unlisted-category/unlisted-category-doc", - "title": "unlisted-category-doc", + { + "frontMatter": {}, + "id": "getting-started", + "sidebarPosition": 0, + "source": "@site/docs/0-getting-started.md", + "sourceDirName": ".", + "title": "Getting Started", }, - "permalink": "/docs/unlisted-category/", - "previous": { - "permalink": "/docs/foo/bazSlug.html", - "title": "baz pagination_label", + { + "frontMatter": {}, + "id": "installation", + "sidebarPosition": 1, + "source": "@site/docs/1-installation.md", + "sourceDirName": ".", + "title": "Installation", }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/unlisted-category/", - "source": "@site/docs/unlisted-category/index.md", - "sourceDirName": "unlisted-category", - "tags": [], - "title": "unlisted-category-index", - "unlisted": false, - "version": "current", + ], + "isCategoryIndex": [Function], + "item": { + "dirName": ".", + "type": "autogenerated", }, - "site-docs-unlisted-category-unlisted-category-doc-md-bd6.json": { - "description": "This is an unlisted category doc", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "unlisted-category-doc", - "unlisted": true, - }, - "id": "unlisted-category/unlisted-category-doc", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/category/slugs", - "title": "Slugs", - }, - "permalink": "/docs/unlisted-category/unlisted-category-doc", - "previous": { - "permalink": "/docs/unlisted-category/", - "title": "unlisted-category-index", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/unlisted-category/unlisted-category-doc", - "source": "@site/docs/unlisted-category/unlisted-category-doc.md", - "sourceDirName": "unlisted-category", - "tags": [], - "title": "unlisted-category-doc", - "unlisted": false, - "version": "current", + "numberPrefixParser": [Function], + "version": { + "contentPath": "docs", + "versionName": "current", }, } `; -exports[`simple website content: global data 1`] = ` +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 1`] = ` { - "pluginName": { - "pluginId": { - "breadcrumbs": true, - "path": "/docs", - "versions": [ - { - "docs": [ - { - "id": "customLastUpdate", - "path": "/docs/customLastUpdate", - "sidebar": undefined, - }, - { - "id": "doc with space", - "path": "/docs/doc with space", - "sidebar": undefined, - }, - { - "id": "doc-draft", - "path": "/docs/doc-draft", - "sidebar": undefined, - }, - { - "id": "doc-unlisted", - "path": "/docs/doc-unlisted", - "sidebar": "docs", - }, - { - "id": "foo/bar", - "path": "/docs/foo/bar", - "sidebar": "docs", - }, - { - "id": "foo/baz", - "path": "/docs/foo/bazSlug.html", - "sidebar": "docs", - }, - { - "id": "headingAsTitle", - "path": "/docs/headingAsTitle", - "sidebar": "docs", - }, - { - "id": "hello", - "path": "/docs/", - "sidebar": "docs", - }, - { - "id": "ipsum", - "path": "/docs/ipsum", - "sidebar": undefined, - }, - { - "id": "lastUpdateAuthorOnly", - "path": "/docs/lastUpdateAuthorOnly", - "sidebar": undefined, - }, - { - "id": "lastUpdateDateOnly", - "path": "/docs/lastUpdateDateOnly", - "sidebar": undefined, - }, - { - "id": "lorem", - "path": "/docs/lorem", - "sidebar": undefined, - }, - { - "id": "rootAbsoluteSlug", - "path": "/docs/rootAbsoluteSlug", - "sidebar": "docs", - }, - { - "id": "rootRelativeSlug", - "path": "/docs/rootRelativeSlug", - "sidebar": "docs", - }, - { - "id": "rootResolvedSlug", - "path": "/docs/hey/rootResolvedSlug", - "sidebar": "docs", - }, - { - "id": "rootTryToEscapeSlug", - "path": "/docs/rootTryToEscapeSlug", - "sidebar": "docs", - }, - { - "id": "slugs/absoluteSlug", - "path": "/docs/absoluteSlug", - "sidebar": undefined, - }, - { - "id": "slugs/relativeSlug", - "path": "/docs/slugs/relativeSlug", - "sidebar": undefined, - }, - { - "id": "slugs/resolvedSlug", - "path": "/docs/slugs/hey/resolvedSlug", - "sidebar": undefined, - }, - { - "id": "slugs/tryToEscapeSlug", - "path": "/docs/tryToEscapeSlug", - "sidebar": undefined, - }, - { - "id": "unlisted-category/unlisted-category-doc", - "path": "/docs/unlisted-category/unlisted-category-doc", - "sidebar": "docs", - }, - { - "id": "unlisted-category/unlisted-category-index", - "path": "/docs/unlisted-category/", - "sidebar": "docs", - }, - { - "id": "/category/slugs", - "path": "/docs/category/slugs", - "sidebar": "docs", - }, - ], - "draftIds": [], - "isLast": true, - "label": "Next", - "mainDocId": "hello", - "name": "current", - "path": "/docs", - "sidebars": { - "docs": { - "link": { - "label": "foo/bar", - "path": "/docs/foo/bar", - }, - }, - }, - }, - ], - }, + "description": "Getting started text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "getting-started", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/installation", + "title": "Installation", }, + "permalink": "/docs/getting-started", + "previous": undefined, + "sidebar": "defaultSidebar", + "sidebarPosition": 0, + "slug": "/getting-started", + "source": "@site/docs/0-getting-started.md", + "sourceDirName": ".", + "tags": [], + "title": "Getting Started", + "unlisted": false, + "version": "current", } `; -exports[`simple website content: route config 1`] = ` -[ - { - "component": "@theme/DocsRoot", - "exact": false, - "path": "/docs", - "routes": [ - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/docs", - "priority": -1, - "props": { - "version": { - "badge": false, - "banner": null, - "className": "docs-version-current", - "docs": { - "customLastUpdate": { - "description": "Custom last update", - "id": "customLastUpdate", - "sidebar": undefined, - "title": "Custom Last Update", - }, - "doc with space": { - "description": "", - "id": "doc with space", - "sidebar": undefined, - "title": "Hoo hoo, if this path tricks you...", - }, - "doc-draft": { - "description": "This is a draft document", - "id": "doc-draft", - "sidebar": undefined, - "title": "doc-draft", - }, - "doc-unlisted": { - "description": "This is an unlisted document", - "id": "doc-unlisted", - "sidebar": "docs", - "title": "doc-unlisted", - }, - "foo/bar": { - "description": "This is custom description", - "id": "foo/bar", - "sidebar": "docs", - "title": "Bar", - }, - "foo/baz": { - "description": "Images", - "id": "foo/baz", - "sidebar": "docs", - "title": "baz", - }, - "headingAsTitle": { - "description": "", - "id": "headingAsTitle", - "sidebar": "docs", - "title": "My heading as title", - }, - "hello": { - "description": "Hi, Endilie here :)", - "id": "hello", - "sidebar": "docs", - "title": "Hello, World !", - }, - "ipsum": { - "description": "Lorem ipsum.", - "id": "ipsum", - "sidebar": undefined, - "title": "ipsum", - }, - "lastUpdateAuthorOnly": { - "description": "Only custom author, so it will still use the date from Git", - "id": "lastUpdateAuthorOnly", - "sidebar": undefined, - "title": "Last Update Author Only", - }, - "lastUpdateDateOnly": { - "description": "Only custom date, so it will still use the author from Git", - "id": "lastUpdateDateOnly", - "sidebar": undefined, - "title": "Last Update Date Only", - }, - "lorem": { - "description": "Lorem ipsum.", - "id": "lorem", - "sidebar": undefined, - "title": "lorem", - }, - "rootAbsoluteSlug": { - "description": "Lorem", - "id": "rootAbsoluteSlug", - "sidebar": "docs", - "title": "rootAbsoluteSlug", - }, - "rootRelativeSlug": { - "description": "Lorem", - "id": "rootRelativeSlug", - "sidebar": "docs", - "title": "rootRelativeSlug", - }, - "rootResolvedSlug": { - "description": "Lorem", - "id": "rootResolvedSlug", - "sidebar": "docs", - "title": "rootResolvedSlug", - }, - "rootTryToEscapeSlug": { - "description": "Lorem", - "id": "rootTryToEscapeSlug", - "sidebar": "docs", - "title": "rootTryToEscapeSlug", - }, - "slugs/absoluteSlug": { - "description": "Lorem", - "id": "slugs/absoluteSlug", - "sidebar": undefined, - "title": "absoluteSlug", - }, - "slugs/relativeSlug": { - "description": "Lorem", - "id": "slugs/relativeSlug", - "sidebar": undefined, - "title": "relativeSlug", - }, - "slugs/resolvedSlug": { - "description": "Lorem", - "id": "slugs/resolvedSlug", - "sidebar": undefined, - "title": "resolvedSlug", - }, - "slugs/tryToEscapeSlug": { - "description": "Lorem", - "id": "slugs/tryToEscapeSlug", - "sidebar": undefined, - "title": "tryToEscapeSlug", - }, - "unlisted-category/unlisted-category-doc": { - "description": "This is an unlisted category doc", - "id": "unlisted-category/unlisted-category-doc", - "sidebar": "docs", - "title": "unlisted-category-doc", - }, - "unlisted-category/unlisted-category-index": { - "description": "This is an unlisted category index", - "id": "unlisted-category/unlisted-category-index", - "sidebar": "docs", - "title": "unlisted-category-index", - }, - }, - "docsSidebars": { - "docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "foo/bar", - "href": "/docs/foo/bar", - "label": "Bar", - "type": "link", - "unlisted": false, - }, - { - "className": undefined, - "customProps": undefined, - "docId": "doc-unlisted", - "href": "/docs/doc-unlisted", - "label": "doc-unlisted", - "type": "link", - "unlisted": false, - }, - { - "className": undefined, - "customProps": undefined, - "docId": "foo/baz", - "href": "/docs/foo/bazSlug.html", - "label": "baz", - "type": "link", - "unlisted": false, - }, - ], - "label": "foo", - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "href": "/docs/unlisted-category/", - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "unlisted-category/unlisted-category-doc", - "href": "/docs/unlisted-category/unlisted-category-doc", - "label": "unlisted-category-doc", - "type": "link", - "unlisted": false, - }, - ], - "label": "Unlisted category", - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "href": "/docs/category/slugs", - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "rootAbsoluteSlug", - "href": "/docs/rootAbsoluteSlug", - "label": "rootAbsoluteSlug", - "type": "link", - "unlisted": false, - }, - { - "className": undefined, - "customProps": undefined, - "docId": "rootRelativeSlug", - "href": "/docs/rootRelativeSlug", - "label": "rootRelativeSlug", - "type": "link", - "unlisted": false, - }, - { - "className": undefined, - "customProps": undefined, - "docId": "rootResolvedSlug", - "href": "/docs/hey/rootResolvedSlug", - "label": "rootResolvedSlug", - "type": "link", - "unlisted": false, - }, - { - "className": undefined, - "customProps": undefined, - "docId": "rootTryToEscapeSlug", - "href": "/docs/rootTryToEscapeSlug", - "label": "rootTryToEscapeSlug", - "type": "link", - "unlisted": false, - }, - ], - "label": "Slugs", - "type": "category", - }, - { - "className": undefined, - "customProps": undefined, - "docId": "headingAsTitle", - "href": "/docs/headingAsTitle", - "label": "My heading as title", - "type": "link", - "unlisted": false, - }, - { - "href": "https://github.com", - "label": "GitHub", - "type": "link", - }, - { - "className": undefined, - "customProps": undefined, - "docId": "hello", - "href": "/docs/", - "label": "Hello sidebar_label", - "type": "link", - "unlisted": false, - }, - ], - "label": "Test", - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "hello", - "href": "/docs/", - "label": "Hello sidebar_label", - "type": "link", - "unlisted": false, - }, - ], - "label": "Guides", - "type": "category", - }, - ], - }, - "isLast": true, - "label": "Next", - "noIndex": false, - "pluginId": "default", - "version": "current", - }, - }, - "routes": [ - { - "component": "@theme/DocTagsListPage", - "exact": true, - "path": "/docs/tags", - "props": { - "tags": [ - { - "count": 2, - "description": undefined, - "label": "tag 1", - "permalink": "/docs/tags/tag-1", - }, - { - "count": 1, - "description": "Global Tag 1 description", - "label": "Global Tag 1 label", - "permalink": "/docs/tags/global-tag-1-permalink", - }, - { - "count": 1, - "description": undefined, - "label": "tag 2", - "permalink": "/docs/tags/tag2-custom-permalink", - }, - { - "count": 1, - "description": undefined, - "label": "tag 3", - "permalink": "/docs/tags/tag-3", - }, - ], - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/tags/global-tag-1-permalink", - "props": { - "tag": { - "allTagsPath": "/docs/tags", - "count": 1, - "description": "Global Tag 1 description", - "items": [ - { - "description": "Images", - "id": "foo/baz", - "permalink": "/docs/foo/bazSlug.html", - "title": "baz", - }, - ], - "label": "Global Tag 1 label", - "permalink": "/docs/tags/global-tag-1-permalink", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/tags/tag-1", - "props": { - "tag": { - "allTagsPath": "/docs/tags", - "count": 2, - "description": undefined, - "items": [ - { - "description": "Images", - "id": "foo/baz", - "permalink": "/docs/foo/bazSlug.html", - "title": "baz", - }, - { - "description": "Hi, Endilie here :)", - "id": "hello", - "permalink": "/docs/", - "title": "Hello, World !", - }, - ], - "label": "tag 1", - "permalink": "/docs/tags/tag-1", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/tags/tag-3", - "props": { - "tag": { - "allTagsPath": "/docs/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "Hi, Endilie here :)", - "id": "hello", - "permalink": "/docs/", - "title": "Hello, World !", - }, - ], - "label": "tag 3", - "permalink": "/docs/tags/tag-3", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/tags/tag2-custom-permalink", - "props": { - "tag": { - "allTagsPath": "/docs/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "Images", - "id": "foo/baz", - "permalink": "/docs/foo/bazSlug.html", - "title": "baz", - }, - ], - "label": "tag 2", - "permalink": "/docs/tags/tag2-custom-permalink", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/docs", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/hello.md", - }, - "modules": { - "content": "@site/docs/hello.md", - }, - "path": "/docs/", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/absoluteSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/absoluteSlug.md", - }, - "path": "/docs/absoluteSlug", - }, - { - "component": "@theme/DocCategoryGeneratedIndexPage", - "exact": true, - "path": "/docs/category/slugs", - "props": { - "categoryGeneratedIndex": { - "description": undefined, - "image": undefined, - "keywords": undefined, - "navigation": { - "next": { - "permalink": "/docs/rootAbsoluteSlug", - "title": "rootAbsoluteSlug", - }, - "previous": { - "permalink": "/docs/unlisted-category/unlisted-category-doc", - "title": "unlisted-category-doc", - }, - }, - "permalink": "/docs/category/slugs", - "sidebar": "docs", - "slug": "/category/slugs", - "title": "Slugs", - }, - }, - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/customLastUpdate.md", - }, - "modules": { - "content": "@site/docs/customLastUpdate.md", - }, - "path": "/docs/customLastUpdate", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/doc with space.md", - }, - "modules": { - "content": "@site/docs/doc with space.md", - }, - "path": "/docs/doc with space", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/doc-draft.md", - }, - "modules": { - "content": "@site/docs/doc-draft.md", - }, - "path": "/docs/doc-draft", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/doc-unlisted.md", - }, - "modules": { - "content": "@site/docs/doc-unlisted.md", - }, - "path": "/docs/doc-unlisted", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/foo/bar.md", - }, - "modules": { - "content": "@site/docs/foo/bar.md", - }, - "path": "/docs/foo/bar", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/foo/baz.md", - }, - "modules": { - "content": "@site/docs/foo/baz.md", - }, - "path": "/docs/foo/bazSlug.html", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/headingAsTitle.md", - }, - "modules": { - "content": "@site/docs/headingAsTitle.md", - }, - "path": "/docs/headingAsTitle", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/rootResolvedSlug.md", - }, - "modules": { - "content": "@site/docs/rootResolvedSlug.md", - }, - "path": "/docs/hey/rootResolvedSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/ipsum.md", - }, - "modules": { - "content": "@site/docs/ipsum.md", - }, - "path": "/docs/ipsum", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/lastUpdateAuthorOnly.md", - }, - "modules": { - "content": "@site/docs/lastUpdateAuthorOnly.md", - }, - "path": "/docs/lastUpdateAuthorOnly", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/lastUpdateDateOnly.md", - }, - "modules": { - "content": "@site/docs/lastUpdateDateOnly.md", - }, - "path": "/docs/lastUpdateDateOnly", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/lorem.md", - }, - "modules": { - "content": "@site/docs/lorem.md", - }, - "path": "/docs/lorem", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/rootAbsoluteSlug.md", - }, - "modules": { - "content": "@site/docs/rootAbsoluteSlug.md", - }, - "path": "/docs/rootAbsoluteSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/rootRelativeSlug.md", - }, - "modules": { - "content": "@site/docs/rootRelativeSlug.md", - }, - "path": "/docs/rootRelativeSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/rootTryToEscapeSlug.md", - }, - "modules": { - "content": "@site/docs/rootTryToEscapeSlug.md", - }, - "path": "/docs/rootTryToEscapeSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/resolvedSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/resolvedSlug.md", - }, - "path": "/docs/slugs/hey/resolvedSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/relativeSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/relativeSlug.md", - }, - "path": "/docs/slugs/relativeSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/tryToEscapeSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/tryToEscapeSlug.md", - }, - "path": "/docs/tryToEscapeSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/unlisted-category/index.md", - }, - "modules": { - "content": "@site/docs/unlisted-category/index.md", - }, - "path": "/docs/unlisted-category/", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/unlisted-category/unlisted-category-doc.md", - }, - "modules": { - "content": "@site/docs/unlisted-category/unlisted-category-doc.md", - }, - "path": "/docs/unlisted-category/unlisted-category-doc", - "sidebar": "docs", - }, - ], - }, - ], - }, - ], +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 2`] = ` +{ + "description": "Installation text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "installation", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide1", + "title": "Guide 1", + }, + "permalink": "/docs/installation", + "previous": { + "permalink": "/docs/getting-started", + "title": "Getting Started", }, -] + "sidebar": "defaultSidebar", + "sidebarPosition": 1, + "slug": "/installation", + "source": "@site/docs/1-installation.md", + "sourceDirName": ".", + "tags": [], + "title": "Installation", + "unlisted": false, + "version": "current", +} `; -exports[`site with custom sidebar items generator sidebar is autogenerated according to a custom sidebarItemsGenerator 1`] = ` +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 3`] = ` { - "defaultSidebar": [ - { - "id": "API/api-overview", - "type": "doc", - }, - { - "id": "API/api-end", - "type": "doc", - }, - ], + "description": "Guide 1 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide1", + "sidebar_position": 1, + }, + "id": "Guides/guide1", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide2", + "title": "Guide 2", + }, + "permalink": "/docs/Guides/guide1", + "previous": { + "permalink": "/docs/installation", + "title": "Installation", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 1, + "slug": "/Guides/guide1", + "source": "@site/docs/Guides/z-guide1.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 1", + "unlisted": false, + "version": "current", } `; -exports[`site with custom sidebar items generator sidebarItemsGenerator can wrap/enhance/sort/reverse the default sidebar generator 1`] = ` +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 4`] = ` { - "defaultSidebar": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/api-end", - "type": "doc", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/Extension APIs/Theme API", - "type": "doc", - }, - { - "id": "API/Extension APIs/Plugin API", - "type": "doc", - }, - ], - "label": "Extension APIs (label from _category_.yml)", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/Core APIs/Server API", - "type": "doc", - }, - { - "id": "API/Core APIs/Client API", - "type": "doc", - }, - ], - "label": "Core APIs", - "link": undefined, - "type": "category", - }, - { - "id": "API/api-overview", - "type": "doc", - }, - ], - "label": "API (label from _category_.json)", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "Guides/guide5", - "type": "doc", - }, - { - "id": "Guides/guide4", - "type": "doc", - }, - { - "id": "Guides/guide3", - "type": "doc", - }, - { - "id": "Guides/guide2.5", - "type": "doc", - }, - { - "id": "Guides/guide2", - "type": "doc", - }, - { - "id": "Guides/guide1", - "type": "doc", - }, - ], - "label": "Guides", - "link": undefined, - "type": "category", - }, - { - "id": "installation", - "type": "doc", - }, - { - "id": "getting-started", - "type": "doc", - }, - ], + "description": "Guide 2 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide2", + }, + "id": "Guides/guide2", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide2.5", + "title": "Guide 2.5", + }, + "permalink": "/docs/Guides/guide2", + "previous": { + "permalink": "/docs/Guides/guide1", + "title": "Guide 1", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 2, + "slug": "/Guides/guide2", + "source": "@site/docs/Guides/02-guide2.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 2", + "unlisted": false, + "version": "current", } `; -exports[`site with custom sidebar items generator sidebarItemsGenerator is called with appropriate data 1`] = ` +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 5`] = ` { - "categoriesMetadata": { - "3-API": { - "label": "API (label from _category_.json)", - }, - "3-API/02_Extension APIs": { - "label": "Extension APIs (label from _category_.yml)", - }, - "Guides": { - "position": 2, - }, - }, - "defaultSidebarItemsGenerator": [Function], - "docs": [ - { - "frontMatter": {}, - "id": "API/Core APIs/Client API", - "sidebarPosition": 0, - "source": "@site/docs/3-API/01_Core APIs/0 --- Client API.md", - "sourceDirName": "3-API/01_Core APIs", - "title": "Client API", - }, - { - "frontMatter": {}, - "id": "API/Core APIs/Server API", - "sidebarPosition": 1, - "source": "@site/docs/3-API/01_Core APIs/1 --- Server API.md", - "sourceDirName": "3-API/01_Core APIs", - "title": "Server API", - }, - { - "frontMatter": {}, - "id": "API/Extension APIs/Plugin API", - "sidebarPosition": 0, - "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", - "sourceDirName": "3-API/02_Extension APIs", - "title": "Plugin API", - }, - { - "frontMatter": {}, - "id": "API/Extension APIs/Theme API", - "sidebarPosition": 1, - "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", - "sourceDirName": "3-API/02_Extension APIs", - "title": "Theme API", - }, - { - "frontMatter": {}, - "id": "API/api-end", - "sidebarPosition": 3, - "source": "@site/docs/3-API/03_api-end.md", - "sourceDirName": "3-API", - "title": "API End", - }, - { - "frontMatter": {}, - "id": "API/api-overview", - "sidebarPosition": 0, - "source": "@site/docs/3-API/00_api-overview.md", - "sourceDirName": "3-API", - "title": "API Overview", - }, - { - "frontMatter": { - "id": "guide1", - "sidebar_position": 1, - }, - "id": "Guides/guide1", - "sidebarPosition": 1, - "source": "@site/docs/Guides/z-guide1.md", - "sourceDirName": "Guides", - "title": "Guide 1", - }, - { - "frontMatter": { - "id": "guide2", - }, - "id": "Guides/guide2", - "sidebarPosition": 2, - "source": "@site/docs/Guides/02-guide2.md", - "sourceDirName": "Guides", - "title": "Guide 2", - }, - { - "frontMatter": { - "id": "guide2.5", - "sidebar_position": 2.5, - }, - "id": "Guides/guide2.5", - "sidebarPosition": 2.5, - "source": "@site/docs/Guides/0-guide2.5.md", - "sourceDirName": "Guides", - "title": "Guide 2.5", - }, - { - "frontMatter": { - "id": "guide3", - "sidebar_position": 3, - }, - "id": "Guides/guide3", - "sidebarPosition": 3, - "source": "@site/docs/Guides/guide3.md", - "sourceDirName": "Guides", - "title": "Guide 3", - }, - { - "frontMatter": { - "id": "guide4", - }, - "id": "Guides/guide4", - "sidebarPosition": undefined, - "source": "@site/docs/Guides/a-guide4.md", - "sourceDirName": "Guides", - "title": "Guide 4", - }, - { - "frontMatter": { - "id": "guide5", - }, - "id": "Guides/guide5", - "sidebarPosition": undefined, - "source": "@site/docs/Guides/b-guide5.md", - "sourceDirName": "Guides", - "title": "Guide 5", - }, - { - "frontMatter": {}, - "id": "getting-started", - "sidebarPosition": 0, - "source": "@site/docs/0-getting-started.md", - "sourceDirName": ".", - "title": "Getting Started", - }, - { - "frontMatter": {}, - "id": "installation", - "sidebarPosition": 1, - "source": "@site/docs/1-installation.md", - "sourceDirName": ".", - "title": "Installation", - }, - ], - "isCategoryIndex": [Function], - "item": { - "dirName": ".", - "type": "autogenerated", - }, - "numberPrefixParser": [Function], - "version": { - "contentPath": "docs", - "versionName": "current", - }, -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 1`] = ` -{ - "description": "Getting started text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "getting-started", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/installation", - "title": "Installation", - }, - "permalink": "/docs/getting-started", - "previous": undefined, - "sidebar": "defaultSidebar", - "sidebarPosition": 0, - "slug": "/getting-started", - "source": "@site/docs/0-getting-started.md", - "sourceDirName": ".", - "tags": [], - "title": "Getting Started", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 2`] = ` -{ - "description": "Installation text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "installation", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide1", - "title": "Guide 1", - }, - "permalink": "/docs/installation", - "previous": { - "permalink": "/docs/getting-started", - "title": "Getting Started", - }, - "sidebar": "defaultSidebar", - "sidebarPosition": 1, - "slug": "/installation", - "source": "@site/docs/1-installation.md", - "sourceDirName": ".", - "tags": [], - "title": "Installation", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 3`] = ` -{ - "description": "Guide 1 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide1", - "sidebar_position": 1, - }, - "id": "Guides/guide1", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide2", - "title": "Guide 2", - }, - "permalink": "/docs/Guides/guide1", - "previous": { - "permalink": "/docs/installation", - "title": "Installation", - }, - "sidebar": "defaultSidebar", - "sidebarPosition": 1, - "slug": "/Guides/guide1", - "source": "@site/docs/Guides/z-guide1.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 1", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 4`] = ` -{ - "description": "Guide 2 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide2", - }, - "id": "Guides/guide2", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide2.5", - "title": "Guide 2.5", - }, - "permalink": "/docs/Guides/guide2", - "previous": { - "permalink": "/docs/Guides/guide1", - "title": "Guide 1", - }, - "sidebar": "defaultSidebar", - "sidebarPosition": 2, - "slug": "/Guides/guide2", - "source": "@site/docs/Guides/02-guide2.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 2", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 5`] = ` -{ - "description": "Guide 2.5 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide2.5", - "sidebar_position": 2.5, + "description": "Guide 2.5 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide2.5", + "sidebar_position": 2.5, }, "id": "Guides/guide2.5", "lastUpdatedAt": undefined, @@ -2970,2214 +1418,272 @@ exports[`site with partial autogenerated sidebars docs in partially generated si } `; -exports[`site with partial autogenerated sidebars sidebar is partially autogenerated 1`] = ` -{ - "someSidebar": [ - { - "id": "API/api-end", - "type": "doc", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/api-overview", - "type": "doc", - }, - { - "id": "API/Extension APIs/Plugin API", - "type": "doc", - }, - { - "id": "API/Extension APIs/Theme API", - "type": "doc", - }, - ], - "label": "Some category", - "link": undefined, - "type": "category", - }, - ], -} -`; - -exports[`versioned website (community) content 1`] = ` -{ - "description": "Team current version (translated)", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "title": "Team title translated", - }, - "id": "team", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/community/next/team", - "previous": undefined, - "sidebar": "community", - "sidebarPosition": undefined, - "slug": "/team", - "source": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", - "sourceDirName": ".", - "tags": [], - "title": "Team title translated", - "unlisted": false, - "version": "current", -} -`; - -exports[`versioned website (community) content 2`] = ` -{ - "description": "Team 1.0.0", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "team", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/community/team", - "previous": undefined, - "sidebar": "community", - "sidebarPosition": undefined, - "slug": "/team", - "source": "@site/community_versioned_docs/version-1.0.0/team.md", - "sourceDirName": ".", - "tags": [], - "title": "team", - "unlisted": false, - "version": "1.0.0", -} -`; - -exports[`versioned website (community) content: 100 version sidebars 1`] = ` -{ - "community": [ - { - "id": "team", - "type": "doc", - }, - ], -} -`; - -exports[`versioned website (community) content: current version sidebars 1`] = ` -{ - "community": [ - { - "id": "team", - "type": "doc", - }, - ], -} -`; - -exports[`versioned website (community) content: data 1`] = ` -{ - "site-community-versioned-docs-version-1-0-0-team-md-359.json": { - "description": "Team 1.0.0", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "team", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/community/team", - "previous": undefined, - "sidebar": "community", - "sidebarPosition": undefined, - "slug": "/team", - "source": "@site/community_versioned_docs/version-1.0.0/team.md", - "sourceDirName": ".", - "tags": [], - "title": "team", - "unlisted": false, - "version": "1.0.0", - }, - "site-i-18-n-en-docusaurus-plugin-content-docs-community-current-team-md-7e5.json": { - "description": "Team current version (translated)", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "title": "Team title translated", - }, - "id": "team", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/community/next/team", - "previous": undefined, - "sidebar": "community", - "sidebarPosition": undefined, - "slug": "/team", - "source": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", - "sourceDirName": ".", - "tags": [], - "title": "Team title translated", - "unlisted": false, - "version": "current", - }, -} -`; - -exports[`versioned website (community) content: global data 1`] = ` -{ - "pluginName": { - "pluginId": { - "breadcrumbs": true, - "path": "/community", - "versions": [ - { - "docs": [ - { - "id": "team", - "path": "/community/next/team", - "sidebar": "community", - }, - ], - "draftIds": [], - "isLast": false, - "label": "Next", - "mainDocId": "team", - "name": "current", - "path": "/community/next", - "sidebars": { - "community": { - "link": { - "label": "team", - "path": "/community/next/team", - }, - }, - }, - }, - { - "docs": [ - { - "id": "team", - "path": "/community/team", - "sidebar": "community", - }, - ], - "draftIds": [], - "isLast": true, - "label": "1.0.0", - "mainDocId": "team", - "name": "1.0.0", - "path": "/community", - "sidebars": { - "community": { - "link": { - "label": "team", - "path": "/community/team", - }, - }, - }, - }, - ], - }, - }, -} -`; - -exports[`versioned website (community) content: route config 1`] = ` -[ - { - "component": "@theme/DocsRoot", - "exact": false, - "path": "/community", - "routes": [ - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/community/next", - "priority": undefined, - "props": { - "version": { - "badge": true, - "banner": "unreleased", - "className": "docs-version-current", - "docs": { - "team": { - "description": "Team current version (translated)", - "id": "team", - "sidebar": "community", - "title": "Team title translated", - }, - }, - "docsSidebars": { - "community": [ - { - "className": undefined, - "customProps": undefined, - "docId": "team", - "href": "/community/next/team", - "label": "Team title translated", - "type": "link", - "unlisted": false, - }, - ], - }, - "isLast": false, - "label": "Next", - "noIndex": false, - "pluginId": "community", - "version": "current", - }, - }, - "routes": [ - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/community/next", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "i18n/en/docusaurus-plugin-content-docs-community/current/team.md", - }, - "modules": { - "content": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", - }, - "path": "/community/next/team", - "sidebar": "community", - }, - ], - }, - ], - }, - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/community", - "priority": -1, - "props": { - "version": { - "badge": true, - "banner": null, - "className": "docs-version-1.0.0", - "docs": { - "team": { - "description": "Team 1.0.0", - "id": "team", - "sidebar": "community", - "title": "team", - }, - }, - "docsSidebars": { - "community": [ - { - "className": undefined, - "customProps": undefined, - "docId": "team", - "href": "/community/team", - "label": "team", - "type": "link", - "unlisted": false, - }, - ], - }, - "isLast": true, - "label": "1.0.0", - "noIndex": false, - "pluginId": "community", - "version": "1.0.0", - }, - }, - "routes": [ - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/community", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "community_versioned_docs/version-1.0.0/team.md", - }, - "modules": { - "content": "@site/community_versioned_docs/version-1.0.0/team.md", - }, - "path": "/community/team", - "sidebar": "community", - }, - ], - }, - ], - }, - ], - }, -] -`; - -exports[`versioned website content 1`] = ` -{ - "description": "This is next version of bar.", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "barSlug", - "tags": [ - "barTag 1", - "barTag-2", - { - "label": "barTag 3", - "permalink": "barTag-3-permalink", - }, - ], - }, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/next/", - "title": "hello", - }, - "permalink": "/docs/next/foo/barSlug", - "previous": undefined, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/barSlug", - "source": "@site/docs/foo/bar.md", - "sourceDirName": "foo", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "barTag 1", - "permalink": "/docs/next/tags/bar-tag-1", - }, - { - "description": undefined, - "inline": true, - "label": "barTag-2", - "permalink": "/docs/next/tags/bar-tag-2", - }, - { - "description": undefined, - "inline": true, - "label": "barTag 3", - "permalink": "/docs/next/tags/barTag-3-permalink", - }, - ], - "title": "bar", - "unlisted": false, - "version": "current", -} -`; - -exports[`versioned website content 2`] = ` -{ - "description": "Bar 1.0.1 !", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/", - "title": "hello", - }, - "permalink": "/docs/foo/bar", - "previous": undefined, - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "sidebarPosition": undefined, - "slug": "/foo/bar", - "source": "@site/versioned_docs/version-1.0.1/foo/bar.md", - "sourceDirName": "foo", - "tags": [], - "title": "bar", - "unlisted": false, - "version": "1.0.1", -} -`; - -exports[`versioned website content 3`] = ` -{ - "description": "Hello next !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/", - "previous": { - "permalink": "/docs/next/foo/barSlug", - "title": "bar", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/docs/hello.md", - "sourceDirName": ".", - "tags": [], - "title": "hello", - "unlisted": false, - "version": "current", -} -`; - -exports[`versioned website content 4`] = ` -{ - "description": "Hello 1.0.1 !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - "tags": [ - "inlineTag-v1.0.1", - "globalTag-v1.0.1", - ], - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/", - "previous": { - "permalink": "/docs/foo/bar", - "title": "bar", - }, - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/versioned_docs/version-1.0.1/hello.md", - "sourceDirName": ".", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "inlineTag-v1.0.1", - "permalink": "/docs/tags/inline-tag-v-1-0-1", - }, - { - "description": "globalTag-v1.0.1 description", - "inline": false, - "label": "globalTag-v1.0.1 label", - "permalink": "/docs/tags/globalTag-v1.0.1 permalink", - }, - ], - "title": "hello", - "unlisted": false, - "version": "1.0.1", -} -`; - -exports[`versioned website content 5`] = ` -{ - "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "foo/baz", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/1.0.0/", - "title": "hello", - }, - "permalink": "/docs/1.0.0/foo/baz", - "previous": { - "permalink": "/docs/1.0.0/foo/barSlug", - "title": "bar", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/baz", - "source": "@site/versioned_docs/version-1.0.0/foo/baz.md", - "sourceDirName": "foo", - "tags": [], - "title": "baz", - "unlisted": false, - "version": "1.0.0", -} -`; - -exports[`versioned website content: 100 version sidebars 1`] = ` -{ - "docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "foo/bar", - "type": "doc", - }, - { - "id": "foo/baz", - "type": "doc", - }, - ], - "label": "Test", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "hello", - "type": "doc", - }, - ], - "label": "Guides", - "link": undefined, - "type": "category", - }, - ], -} -`; - -exports[`versioned website content: 101 version sidebars 1`] = ` -{ - "VersionedSideBarNameDoesNotMatter/docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "foo/bar", - "type": "doc", - }, - ], - "label": "Test", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "hello", - "type": "doc", - }, - ], - "label": "Guides", - "link": undefined, - "type": "category", - }, - ], -} -`; - -exports[`versioned website content: current version sidebars 1`] = ` -{ - "docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "foo/bar", - "type": "doc", - }, - ], - "label": "Test", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "hello", - "type": "doc", - }, - ], - "label": "Guides", - "link": undefined, - "type": "category", - }, - ], -} -`; - -exports[`versioned website content: data 1`] = ` -{ - "site-docs-foo-bar-md-8c2.json": { - "description": "This is next version of bar.", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "barSlug", - "tags": [ - "barTag 1", - "barTag-2", - { - "label": "barTag 3", - "permalink": "barTag-3-permalink", - }, - ], - }, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/next/", - "title": "hello", - }, - "permalink": "/docs/next/foo/barSlug", - "previous": undefined, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/barSlug", - "source": "@site/docs/foo/bar.md", - "sourceDirName": "foo", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "barTag 1", - "permalink": "/docs/next/tags/bar-tag-1", - }, - { - "description": undefined, - "inline": true, - "label": "barTag-2", - "permalink": "/docs/next/tags/bar-tag-2", - }, - { - "description": undefined, - "inline": true, - "label": "barTag 3", - "permalink": "/docs/next/tags/barTag-3-permalink", - }, - ], - "title": "bar", - "unlisted": false, - "version": "current", - }, - "site-docs-hello-md-9df.json": { - "description": "Hello next !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/", - "previous": { - "permalink": "/docs/next/foo/barSlug", - "title": "bar", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/docs/hello.md", - "sourceDirName": ".", - "tags": [], - "title": "hello", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-absolute-slug-md-4e8.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/absoluteSlug", - }, - "id": "slugs/absoluteSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/absoluteSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/absoluteSlug", - "source": "@site/docs/slugs/absoluteSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "absoluteSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-relative-slug-md-d1c.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "relativeSlug", - }, - "id": "slugs/relativeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/slugs/relativeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/slugs/relativeSlug", - "source": "@site/docs/slugs/relativeSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "relativeSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-resolved-slug-md-02b.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "./hey/ho/../resolvedSlug", - }, - "id": "slugs/resolvedSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/slugs/hey/resolvedSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/slugs/hey/resolvedSlug", - "source": "@site/docs/slugs/resolvedSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "resolvedSlug", - "unlisted": false, - "version": "current", - }, - "site-docs-slugs-try-to-escape-slug-md-70d.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "../../../../../../../../tryToEscapeSlug", - }, - "id": "slugs/tryToEscapeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/tryToEscapeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/tryToEscapeSlug", - "source": "@site/docs/slugs/tryToEscapeSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "tryToEscapeSlug", - "unlisted": false, - "version": "current", - }, - "site-i-18-n-en-docusaurus-plugin-content-docs-version-1-0-0-hello-md-fe5.json": { - "description": "Hello 1.0.0 ! (translated en)", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - "tags": [ - "inlineTag-v1.0.0", - "globalTag-v1.0.0", - ], - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/1.0.0/", - "previous": { - "permalink": "/docs/1.0.0/foo/baz", - "title": "baz", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/i18n/en/docusaurus-plugin-content-docs/version-1.0.0/hello.md", - "sourceDirName": ".", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "inlineTag-v1.0.0", - "permalink": "/docs/1.0.0/tags/inline-tag-v-1-0-0", - }, - { - "description": "globalTag-v1.0.0 description (en)", - "inline": false, - "label": "globalTag-v1.0.0 label (en)", - "permalink": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", - }, - ], - "title": "hello", - "unlisted": false, - "version": "1.0.0", - }, - "site-versioned-docs-version-1-0-0-foo-bar-md-7a6.json": { - "description": "Bar 1.0.0 !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "barSlug", - }, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/1.0.0/foo/baz", - "title": "baz", - }, - "permalink": "/docs/1.0.0/foo/barSlug", - "previous": undefined, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/barSlug", - "source": "@site/versioned_docs/version-1.0.0/foo/bar.md", - "sourceDirName": "foo", - "tags": [], - "title": "bar", - "unlisted": false, - "version": "1.0.0", - }, - "site-versioned-docs-version-1-0-0-foo-baz-md-883.json": { - "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "foo/baz", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/1.0.0/", - "title": "hello", - }, - "permalink": "/docs/1.0.0/foo/baz", - "previous": { - "permalink": "/docs/1.0.0/foo/barSlug", - "title": "bar", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/baz", - "source": "@site/versioned_docs/version-1.0.0/foo/baz.md", - "sourceDirName": "foo", - "tags": [], - "title": "baz", - "unlisted": false, - "version": "1.0.0", - }, - "site-versioned-docs-version-1-0-1-foo-bar-md-7a3.json": { - "description": "Bar 1.0.1 !", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/", - "title": "hello", - }, - "permalink": "/docs/foo/bar", - "previous": undefined, - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "sidebarPosition": undefined, - "slug": "/foo/bar", - "source": "@site/versioned_docs/version-1.0.1/foo/bar.md", - "sourceDirName": "foo", - "tags": [], - "title": "bar", - "unlisted": false, - "version": "1.0.1", - }, - "site-versioned-docs-version-1-0-1-hello-md-0c7.json": { - "description": "Hello 1.0.1 !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - "tags": [ - "inlineTag-v1.0.1", - "globalTag-v1.0.1", - ], - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/", - "previous": { - "permalink": "/docs/foo/bar", - "title": "bar", - }, - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/versioned_docs/version-1.0.1/hello.md", - "sourceDirName": ".", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "inlineTag-v1.0.1", - "permalink": "/docs/tags/inline-tag-v-1-0-1", - }, - { - "description": "globalTag-v1.0.1 description", - "inline": false, - "label": "globalTag-v1.0.1 label", - "permalink": "/docs/tags/globalTag-v1.0.1 permalink", - }, - ], - "title": "hello", - "unlisted": false, - "version": "1.0.1", - }, - "site-versioned-docs-version-with-slugs-root-absolute-slug-md-4d2.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/rootAbsoluteSlug", - }, - "id": "rootAbsoluteSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/rootAbsoluteSlug", - "previous": undefined, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/rootAbsoluteSlug", - "source": "@site/versioned_docs/version-withSlugs/rootAbsoluteSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootAbsoluteSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-root-relative-slug-md-32a.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "rootRelativeSlug", - }, - "id": "rootRelativeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/rootRelativeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/rootRelativeSlug", - "source": "@site/versioned_docs/version-withSlugs/rootRelativeSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootRelativeSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-root-resolved-slug-md-aee.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "./hey/ho/../rootResolvedSlug", - }, - "id": "rootResolvedSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/hey/rootResolvedSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/hey/rootResolvedSlug", - "source": "@site/versioned_docs/version-withSlugs/rootResolvedSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootResolvedSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-root-try-to-escape-slug-md-b5d.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "../../../../../../../../rootTryToEscapeSlug", - }, - "id": "rootTryToEscapeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/rootTryToEscapeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/rootTryToEscapeSlug", - "source": "@site/versioned_docs/version-withSlugs/rootTryToEscapeSlug.md", - "sourceDirName": ".", - "tags": [], - "title": "rootTryToEscapeSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-slugs-absolute-slug-md-47a.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/absoluteSlug", - }, - "id": "slugs/absoluteSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/absoluteSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/absoluteSlug", - "source": "@site/versioned_docs/version-withSlugs/slugs/absoluteSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "absoluteSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-slugs-relative-slug-md-a95.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "relativeSlug", - }, - "id": "slugs/relativeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/slugs/relativeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/slugs/relativeSlug", - "source": "@site/versioned_docs/version-withSlugs/slugs/relativeSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "relativeSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-slugs-resolved-slug-md-5a1.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "./hey/ho/../resolvedSlug", - }, - "id": "slugs/resolvedSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/slugs/hey/resolvedSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/slugs/hey/resolvedSlug", - "source": "@site/versioned_docs/version-withSlugs/slugs/resolvedSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "resolvedSlug", - "unlisted": false, - "version": "withSlugs", - }, - "site-versioned-docs-version-with-slugs-slugs-try-to-escape-slug-md-4e1.json": { - "description": "Lorem", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "../../../../../../../../tryToEscapeSlug", - }, - "id": "slugs/tryToEscapeSlug", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/withSlugs/tryToEscapeSlug", - "previous": undefined, - "sidebar": undefined, - "sidebarPosition": undefined, - "slug": "/tryToEscapeSlug", - "source": "@site/versioned_docs/version-withSlugs/slugs/tryToEscapeSlug.md", - "sourceDirName": "slugs", - "tags": [], - "title": "tryToEscapeSlug", - "unlisted": false, - "version": "withSlugs", - }, -} -`; - -exports[`versioned website content: global data 1`] = ` -{ - "pluginName": { - "pluginId": { - "breadcrumbs": true, - "path": "/docs", - "versions": [ - { - "docs": [ - { - "id": "foo/bar", - "path": "/docs/next/foo/barSlug", - "sidebar": "docs", - }, - { - "id": "hello", - "path": "/docs/next/", - "sidebar": "docs", - }, - { - "id": "slugs/absoluteSlug", - "path": "/docs/next/absoluteSlug", - "sidebar": undefined, - }, - { - "id": "slugs/relativeSlug", - "path": "/docs/next/slugs/relativeSlug", - "sidebar": undefined, - }, - { - "id": "slugs/resolvedSlug", - "path": "/docs/next/slugs/hey/resolvedSlug", - "sidebar": undefined, - }, - { - "id": "slugs/tryToEscapeSlug", - "path": "/docs/next/tryToEscapeSlug", - "sidebar": undefined, - }, - ], - "draftIds": [], - "isLast": false, - "label": "Next", - "mainDocId": "hello", - "name": "current", - "path": "/docs/next", - "sidebars": { - "docs": { - "link": { - "label": "foo/bar", - "path": "/docs/next/foo/barSlug", - }, - }, - }, - }, - { - "docs": [ - { - "id": "foo/bar", - "path": "/docs/foo/bar", - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - }, - { - "id": "hello", - "path": "/docs/", - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - }, - ], - "draftIds": [], - "isLast": true, - "label": "1.0.1", - "mainDocId": "hello", - "name": "1.0.1", - "path": "/docs", - "sidebars": { - "VersionedSideBarNameDoesNotMatter/docs": { - "link": { - "label": "foo/bar", - "path": "/docs/foo/bar", - }, - }, - }, - }, - { - "docs": [ - { - "id": "foo/bar", - "path": "/docs/1.0.0/foo/barSlug", - "sidebar": "docs", - }, - { - "id": "foo/baz", - "path": "/docs/1.0.0/foo/baz", - "sidebar": "docs", - }, - { - "id": "hello", - "path": "/docs/1.0.0/", - "sidebar": "docs", - }, - ], - "draftIds": [], - "isLast": false, - "label": "1.0.0", - "mainDocId": "hello", - "name": "1.0.0", - "path": "/docs/1.0.0", - "sidebars": { - "docs": { - "link": { - "label": "foo/bar", - "path": "/docs/1.0.0/foo/barSlug", - }, - }, - }, - }, - { - "docs": [ - { - "id": "rootAbsoluteSlug", - "path": "/docs/withSlugs/rootAbsoluteSlug", - "sidebar": "docs", - }, - { - "id": "rootRelativeSlug", - "path": "/docs/withSlugs/rootRelativeSlug", - "sidebar": undefined, - }, - { - "id": "rootResolvedSlug", - "path": "/docs/withSlugs/hey/rootResolvedSlug", - "sidebar": undefined, - }, - { - "id": "rootTryToEscapeSlug", - "path": "/docs/withSlugs/rootTryToEscapeSlug", - "sidebar": undefined, - }, - { - "id": "slugs/absoluteSlug", - "path": "/docs/withSlugs/absoluteSlug", - "sidebar": undefined, - }, - { - "id": "slugs/relativeSlug", - "path": "/docs/withSlugs/slugs/relativeSlug", - "sidebar": undefined, - }, - { - "id": "slugs/resolvedSlug", - "path": "/docs/withSlugs/slugs/hey/resolvedSlug", - "sidebar": undefined, - }, - { - "id": "slugs/tryToEscapeSlug", - "path": "/docs/withSlugs/tryToEscapeSlug", - "sidebar": undefined, - }, - ], - "draftIds": [], - "isLast": false, - "label": "withSlugs", - "mainDocId": "rootAbsoluteSlug", - "name": "withSlugs", - "path": "/docs/withSlugs", - "sidebars": { - "docs": { - "link": { - "label": "rootAbsoluteSlug", - "path": "/docs/withSlugs/rootAbsoluteSlug", - }, - }, - }, - }, - ], - }, - }, -} -`; - -exports[`versioned website content: route config 1`] = ` -[ - { - "component": "@theme/DocsRoot", - "exact": false, - "path": "/docs", - "routes": [ - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/docs/1.0.0", - "priority": undefined, - "props": { - "version": { - "badge": true, - "banner": "unmaintained", - "className": "docs-version-1.0.0", - "docs": { - "foo/bar": { - "description": "Bar 1.0.0 !", - "id": "foo/bar", - "sidebar": "docs", - "title": "bar", - }, - "foo/baz": { - "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", - "id": "foo/baz", - "sidebar": "docs", - "title": "baz", - }, - "hello": { - "description": "Hello 1.0.0 ! (translated en)", - "id": "hello", - "sidebar": "docs", - "title": "hello", - }, - }, - "docsSidebars": { - "docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "foo/bar", - "href": "/docs/1.0.0/foo/barSlug", - "label": "bar", - "type": "link", - "unlisted": false, - }, - { - "className": undefined, - "customProps": undefined, - "docId": "foo/baz", - "href": "/docs/1.0.0/foo/baz", - "label": "baz", - "type": "link", - "unlisted": false, - }, - ], - "label": "Test", - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "hello", - "href": "/docs/1.0.0/", - "label": "hello", - "type": "link", - "unlisted": false, - }, - ], - "label": "Guides", - "type": "category", - }, - ], - }, - "isLast": false, - "label": "1.0.0", - "noIndex": false, - "pluginId": "default", - "version": "1.0.0", - }, - }, - "routes": [ - { - "component": "@theme/DocTagsListPage", - "exact": true, - "path": "/docs/1.0.0/tags", - "props": { - "tags": [ - { - "count": 1, - "description": undefined, - "label": "inlineTag-v1.0.0", - "permalink": "/docs/1.0.0/tags/inline-tag-v-1-0-0", - }, - { - "count": 1, - "description": "globalTag-v1.0.0 description (en)", - "label": "globalTag-v1.0.0 label (en)", - "permalink": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", - }, - ], - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", - "props": { - "tag": { - "allTagsPath": "/docs/1.0.0/tags", - "count": 1, - "description": "globalTag-v1.0.0 description (en)", - "items": [ - { - "description": "Hello 1.0.0 ! (translated en)", - "id": "hello", - "permalink": "/docs/1.0.0/", - "title": "hello", - }, - ], - "label": "globalTag-v1.0.0 label (en)", - "permalink": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/1.0.0/tags/inline-tag-v-1-0-0", - "props": { - "tag": { - "allTagsPath": "/docs/1.0.0/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "Hello 1.0.0 ! (translated en)", - "id": "hello", - "permalink": "/docs/1.0.0/", - "title": "hello", - }, - ], - "label": "inlineTag-v1.0.0", - "permalink": "/docs/1.0.0/tags/inline-tag-v-1-0-0", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/docs/1.0.0", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "i18n/en/docusaurus-plugin-content-docs/version-1.0.0/hello.md", - }, - "modules": { - "content": "@site/i18n/en/docusaurus-plugin-content-docs/version-1.0.0/hello.md", - }, - "path": "/docs/1.0.0/", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-1.0.0/foo/bar.md", - }, - "modules": { - "content": "@site/versioned_docs/version-1.0.0/foo/bar.md", - }, - "path": "/docs/1.0.0/foo/barSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-1.0.0/foo/baz.md", - }, - "modules": { - "content": "@site/versioned_docs/version-1.0.0/foo/baz.md", - }, - "path": "/docs/1.0.0/foo/baz", - "sidebar": "docs", - }, - ], - }, - ], - }, - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/docs/next", - "priority": undefined, - "props": { - "version": { - "badge": true, - "banner": "unreleased", - "className": "docs-version-current", - "docs": { - "foo/bar": { - "description": "This is next version of bar.", - "id": "foo/bar", - "sidebar": "docs", - "title": "bar", - }, - "hello": { - "description": "Hello next !", - "id": "hello", - "sidebar": "docs", - "title": "hello", - }, - "slugs/absoluteSlug": { - "description": "Lorem", - "id": "slugs/absoluteSlug", - "sidebar": undefined, - "title": "absoluteSlug", - }, - "slugs/relativeSlug": { - "description": "Lorem", - "id": "slugs/relativeSlug", - "sidebar": undefined, - "title": "relativeSlug", - }, - "slugs/resolvedSlug": { - "description": "Lorem", - "id": "slugs/resolvedSlug", - "sidebar": undefined, - "title": "resolvedSlug", - }, - "slugs/tryToEscapeSlug": { - "description": "Lorem", - "id": "slugs/tryToEscapeSlug", - "sidebar": undefined, - "title": "tryToEscapeSlug", - }, - }, - "docsSidebars": { - "docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "foo/bar", - "href": "/docs/next/foo/barSlug", - "label": "bar", - "type": "link", - "unlisted": false, - }, - ], - "label": "Test", - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "hello", - "href": "/docs/next/", - "label": "hello", - "type": "link", - "unlisted": false, - }, - ], - "label": "Guides", - "type": "category", - }, - ], - }, - "isLast": false, - "label": "Next", - "noIndex": false, - "pluginId": "default", - "version": "current", - }, - }, - "routes": [ - { - "component": "@theme/DocTagsListPage", - "exact": true, - "path": "/docs/next/tags", - "props": { - "tags": [ - { - "count": 1, - "description": undefined, - "label": "barTag 1", - "permalink": "/docs/next/tags/bar-tag-1", - }, - { - "count": 1, - "description": undefined, - "label": "barTag-2", - "permalink": "/docs/next/tags/bar-tag-2", - }, - { - "count": 1, - "description": undefined, - "label": "barTag 3", - "permalink": "/docs/next/tags/barTag-3-permalink", - }, - ], - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/next/tags/bar-tag-1", - "props": { - "tag": { - "allTagsPath": "/docs/next/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "This is next version of bar.", - "id": "foo/bar", - "permalink": "/docs/next/foo/barSlug", - "title": "bar", - }, - ], - "label": "barTag 1", - "permalink": "/docs/next/tags/bar-tag-1", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/next/tags/bar-tag-2", - "props": { - "tag": { - "allTagsPath": "/docs/next/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "This is next version of bar.", - "id": "foo/bar", - "permalink": "/docs/next/foo/barSlug", - "title": "bar", - }, - ], - "label": "barTag-2", - "permalink": "/docs/next/tags/bar-tag-2", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/next/tags/barTag-3-permalink", - "props": { - "tag": { - "allTagsPath": "/docs/next/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "This is next version of bar.", - "id": "foo/bar", - "permalink": "/docs/next/foo/barSlug", - "title": "bar", - }, - ], - "label": "barTag 3", - "permalink": "/docs/next/tags/barTag-3-permalink", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/docs/next", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/hello.md", - }, - "modules": { - "content": "@site/docs/hello.md", - }, - "path": "/docs/next/", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/absoluteSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/absoluteSlug.md", - }, - "path": "/docs/next/absoluteSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/foo/bar.md", - }, - "modules": { - "content": "@site/docs/foo/bar.md", - }, - "path": "/docs/next/foo/barSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/resolvedSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/resolvedSlug.md", - }, - "path": "/docs/next/slugs/hey/resolvedSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/relativeSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/relativeSlug.md", - }, - "path": "/docs/next/slugs/relativeSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "docs/slugs/tryToEscapeSlug.md", - }, - "modules": { - "content": "@site/docs/slugs/tryToEscapeSlug.md", - }, - "path": "/docs/next/tryToEscapeSlug", - }, - ], - }, - ], - }, - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/docs/withSlugs", - "priority": undefined, - "props": { - "version": { - "badge": true, - "banner": "unmaintained", - "className": "docs-version-withSlugs", - "docs": { - "rootAbsoluteSlug": { - "description": "Lorem", - "id": "rootAbsoluteSlug", - "sidebar": "docs", - "title": "rootAbsoluteSlug", - }, - "rootRelativeSlug": { - "description": "Lorem", - "id": "rootRelativeSlug", - "sidebar": undefined, - "title": "rootRelativeSlug", - }, - "rootResolvedSlug": { - "description": "Lorem", - "id": "rootResolvedSlug", - "sidebar": undefined, - "title": "rootResolvedSlug", - }, - "rootTryToEscapeSlug": { - "description": "Lorem", - "id": "rootTryToEscapeSlug", - "sidebar": undefined, - "title": "rootTryToEscapeSlug", - }, - "slugs/absoluteSlug": { - "description": "Lorem", - "id": "slugs/absoluteSlug", - "sidebar": undefined, - "title": "absoluteSlug", - }, - "slugs/relativeSlug": { - "description": "Lorem", - "id": "slugs/relativeSlug", - "sidebar": undefined, - "title": "relativeSlug", - }, - "slugs/resolvedSlug": { - "description": "Lorem", - "id": "slugs/resolvedSlug", - "sidebar": undefined, - "title": "resolvedSlug", - }, - "slugs/tryToEscapeSlug": { - "description": "Lorem", - "id": "slugs/tryToEscapeSlug", - "sidebar": undefined, - "title": "tryToEscapeSlug", - }, - }, - "docsSidebars": { - "docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "rootAbsoluteSlug", - "href": "/docs/withSlugs/rootAbsoluteSlug", - "label": "rootAbsoluteSlug", - "type": "link", - "unlisted": false, - }, - ], - "label": "Test", - "type": "category", - }, - ], - }, - "isLast": false, - "label": "withSlugs", - "noIndex": false, - "pluginId": "default", - "version": "withSlugs", - }, - }, - "routes": [ - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/docs/withSlugs", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/slugs/absoluteSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/slugs/absoluteSlug.md", - }, - "path": "/docs/withSlugs/absoluteSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/rootResolvedSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/rootResolvedSlug.md", - }, - "path": "/docs/withSlugs/hey/rootResolvedSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/rootAbsoluteSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/rootAbsoluteSlug.md", - }, - "path": "/docs/withSlugs/rootAbsoluteSlug", - "sidebar": "docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/rootRelativeSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/rootRelativeSlug.md", - }, - "path": "/docs/withSlugs/rootRelativeSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/rootTryToEscapeSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/rootTryToEscapeSlug.md", - }, - "path": "/docs/withSlugs/rootTryToEscapeSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/slugs/resolvedSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/slugs/resolvedSlug.md", - }, - "path": "/docs/withSlugs/slugs/hey/resolvedSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/slugs/relativeSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/slugs/relativeSlug.md", - }, - "path": "/docs/withSlugs/slugs/relativeSlug", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-withSlugs/slugs/tryToEscapeSlug.md", - }, - "modules": { - "content": "@site/versioned_docs/version-withSlugs/slugs/tryToEscapeSlug.md", - }, - "path": "/docs/withSlugs/tryToEscapeSlug", - }, - ], - }, - ], - }, - { - "component": "@theme/DocVersionRoot", - "exact": false, - "path": "/docs", - "priority": -1, - "props": { - "version": { - "badge": true, - "banner": null, - "className": "docs-version-1.0.1", - "docs": { - "foo/bar": { - "description": "Bar 1.0.1 !", - "id": "foo/bar", - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "title": "bar", - }, - "hello": { - "description": "Hello 1.0.1 !", - "id": "hello", - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "title": "hello", - }, - }, - "docsSidebars": { - "VersionedSideBarNameDoesNotMatter/docs": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "foo/bar", - "href": "/docs/foo/bar", - "label": "bar", - "type": "link", - "unlisted": false, - }, - ], - "label": "Test", - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "className": undefined, - "customProps": undefined, - "docId": "hello", - "href": "/docs/", - "label": "hello", - "type": "link", - "unlisted": false, - }, - ], - "label": "Guides", - "type": "category", - }, - ], - }, - "isLast": true, - "label": "1.0.1", - "noIndex": true, - "pluginId": "default", - "version": "1.0.1", - }, - }, - "routes": [ - { - "component": "@theme/DocTagsListPage", - "exact": true, - "path": "/docs/tags", - "props": { - "tags": [ - { - "count": 1, - "description": undefined, - "label": "inlineTag-v1.0.1", - "permalink": "/docs/tags/inline-tag-v-1-0-1", - }, - { - "count": 1, - "description": "globalTag-v1.0.1 description", - "label": "globalTag-v1.0.1 label", - "permalink": "/docs/tags/globalTag-v1.0.1 permalink", - }, - ], - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/tags/globalTag-v1.0.1 permalink", - "props": { - "tag": { - "allTagsPath": "/docs/tags", - "count": 1, - "description": "globalTag-v1.0.1 description", - "items": [ - { - "description": "Hello 1.0.1 !", - "id": "hello", - "permalink": "/docs/", - "title": "hello", - }, - ], - "label": "globalTag-v1.0.1 label", - "permalink": "/docs/tags/globalTag-v1.0.1 permalink", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocTagDocListPage", - "exact": true, - "path": "/docs/tags/inline-tag-v-1-0-1", - "props": { - "tag": { - "allTagsPath": "/docs/tags", - "count": 1, - "description": undefined, - "items": [ - { - "description": "Hello 1.0.1 !", - "id": "hello", - "permalink": "/docs/", - "title": "hello", - }, - ], - "label": "inlineTag-v1.0.1", - "permalink": "/docs/tags/inline-tag-v-1-0-1", - "unlisted": false, - }, - }, - }, - { - "component": "@theme/DocRoot", - "exact": false, - "path": "/docs", - "routes": [ - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-1.0.1/hello.md", - }, - "modules": { - "content": "@site/versioned_docs/version-1.0.1/hello.md", - }, - "path": "/docs/", - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - }, - { - "component": "@theme/DocItem", - "exact": true, - "metadata": { - "lastUpdatedAt": undefined, - "sourceFilePath": "versioned_docs/version-1.0.1/foo/bar.md", - }, - "modules": { - "content": "@site/versioned_docs/version-1.0.1/foo/bar.md", - }, - "path": "/docs/foo/bar", - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - }, - ], - }, - ], - }, - ], - }, -] -`; - -exports[`versioned website content: withSlugs version sidebars 1`] = ` +exports[`site with partial autogenerated sidebars sidebar is partially autogenerated 1`] = ` { - "docs": [ + "someSidebar": [ + { + "id": "API/api-end", + "type": "doc", + }, { "collapsed": true, "collapsible": true, "items": [ { - "id": "rootAbsoluteSlug", + "id": "API/api-overview", + "type": "doc", + }, + { + "id": "API/Extension APIs/Plugin API", + "type": "doc", + }, + { + "id": "API/Extension APIs/Theme API", "type": "doc", }, ], - "label": "Test", + "label": "Some category", "link": undefined, "type": "category", }, ], } `; + +exports[`versioned website (community) content 1`] = ` +{ + "description": "Team current version (translated)", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "title": "Team title translated", + }, + "id": "team", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/community/next/team", + "previous": undefined, + "sidebar": "community", + "sidebarPosition": undefined, + "slug": "/team", + "source": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", + "sourceDirName": ".", + "tags": [], + "title": "Team title translated", + "unlisted": false, + "version": "current", +} +`; + +exports[`versioned website (community) content 2`] = ` +{ + "description": "Team 1.0.0", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "team", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/community/team", + "previous": undefined, + "sidebar": "community", + "sidebarPosition": undefined, + "slug": "/team", + "source": "@site/community_versioned_docs/version-1.0.0/team.md", + "sourceDirName": ".", + "tags": [], + "title": "team", + "unlisted": false, + "version": "1.0.0", +} +`; + +exports[`versioned website content 1`] = ` +{ + "description": "This is next version of bar.", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "barSlug", + "tags": [ + "barTag 1", + "barTag-2", + { + "label": "barTag 3", + "permalink": "barTag-3-permalink", + }, + ], + }, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/next/", + "title": "hello", + }, + "permalink": "/docs/next/foo/barSlug", + "previous": undefined, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/barSlug", + "source": "@site/docs/foo/bar.md", + "sourceDirName": "foo", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "barTag 1", + "permalink": "/docs/next/tags/bar-tag-1", + }, + { + "description": undefined, + "inline": true, + "label": "barTag-2", + "permalink": "/docs/next/tags/bar-tag-2", + }, + { + "description": undefined, + "inline": true, + "label": "barTag 3", + "permalink": "/docs/next/tags/barTag-3-permalink", + }, + ], + "title": "bar", + "unlisted": false, + "version": "current", +} +`; + +exports[`versioned website content 2`] = ` +{ + "description": "Bar 1.0.1 !", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/", + "title": "hello", + }, + "permalink": "/docs/foo/bar", + "previous": undefined, + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "sidebarPosition": undefined, + "slug": "/foo/bar", + "source": "@site/versioned_docs/version-1.0.1/foo/bar.md", + "sourceDirName": "foo", + "tags": [], + "title": "bar", + "unlisted": false, + "version": "1.0.1", +} +`; + +exports[`versioned website content 3`] = ` +{ + "description": "Hello next !", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/", + }, + "id": "hello", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/next/", + "previous": { + "permalink": "/docs/next/foo/barSlug", + "title": "bar", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/docs/hello.md", + "sourceDirName": ".", + "tags": [], + "title": "hello", + "unlisted": false, + "version": "current", +} +`; + +exports[`versioned website content 4`] = ` +{ + "description": "Hello 1.0.1 !", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/", + "tags": [ + "inlineTag-v1.0.1", + "globalTag-v1.0.1", + ], + }, + "id": "hello", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/", + "previous": { + "permalink": "/docs/foo/bar", + "title": "bar", + }, + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/versioned_docs/version-1.0.1/hello.md", + "sourceDirName": ".", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "inlineTag-v1.0.1", + "permalink": "/docs/tags/inline-tag-v-1-0-1", + }, + { + "description": "globalTag-v1.0.1 description", + "inline": false, + "label": "globalTag-v1.0.1 label", + "permalink": "/docs/tags/globalTag-v1.0.1 permalink", + }, + ], + "title": "hello", + "unlisted": false, + "version": "1.0.1", +} +`; + +exports[`versioned website content 5`] = ` +{ + "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "foo/baz", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/1.0.0/", + "title": "hello", + }, + "permalink": "/docs/1.0.0/foo/baz", + "previous": { + "permalink": "/docs/1.0.0/foo/barSlug", + "title": "bar", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/baz", + "source": "@site/versioned_docs/version-1.0.0/foo/baz.md", + "sourceDirName": "foo", + "tags": [], + "title": "baz", + "unlisted": false, + "version": "1.0.0", +} +`; diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts b/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts index 26594bc95daf..61c863f7de6f 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/index.test.ts @@ -330,7 +330,7 @@ describe('simple website', () => { configureWebpackUtils: await createConfigureWebpackUtils({ siteConfig: { webpack: {jsLoader: 'babel'}, - future: {experimental_faster: fromPartial({})}, + future: {faster: fromPartial({})}, }, }), content, diff --git a/packages/docusaurus-plugin-content-docs/src/index.ts b/packages/docusaurus-plugin-content-docs/src/index.ts index 317dadbad08f..f87d8f123121 100644 --- a/packages/docusaurus-plugin-content-docs/src/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/index.ts @@ -132,7 +132,7 @@ export default async function pluginContentDocs( ].filter((d): d is string => typeof d === 'string'), useCrossCompilerCache: - siteConfig.future.experimental_faster.mdxCrossCompilerCache, + siteConfig.future.faster.mdxCrossCompilerCache, admonitions: options.admonitions, remarkPlugins, rehypePlugins, diff --git a/packages/docusaurus-plugin-content-pages/src/index.ts b/packages/docusaurus-plugin-content-pages/src/index.ts index 3d250894d876..49d044846266 100644 --- a/packages/docusaurus-plugin-content-pages/src/index.ts +++ b/packages/docusaurus-plugin-content-pages/src/index.ts @@ -59,7 +59,7 @@ export default async function pluginContentPages( .map(addTrailingPathSeparator), options: { useCrossCompilerCache: - siteConfig.future.experimental_faster.mdxCrossCompilerCache, + siteConfig.future.faster.mdxCrossCompilerCache, admonitions, remarkPlugins, rehypePlugins, diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index fd0aa6d56f84..643a069af958 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -157,7 +157,7 @@ export default function pluginPWA( minimizer: debug ? [] : await getMinimizers({ - faster: props.siteConfig.future.experimental_faster, + faster: props.siteConfig.future.faster, currentBundler: props.currentBundler, }), }, diff --git a/packages/docusaurus-types/src/config.d.ts b/packages/docusaurus-types/src/config.d.ts index 0ce567b4a20e..b6d3d8a0a396 100644 --- a/packages/docusaurus-types/src/config.d.ts +++ b/packages/docusaurus-types/src/config.d.ts @@ -40,6 +40,7 @@ export type FutureV4Config = { removeLegacyPostBuildHeadAttribute: boolean; useCssCascadeLayers: boolean; siteStorageNamespacing: boolean; + fasterByDefault: boolean; }; // VCS (Version Control System) info about a given change, e.g., a git commit. @@ -95,7 +96,7 @@ export type FutureConfig = { */ v4: FutureV4Config; - experimental_faster: FasterConfig; + faster: FasterConfig; experimental_vcs: VcsConfig; @@ -421,7 +422,7 @@ export type Config = Overwrite< DeepPartial, { v4?: boolean | Partial; - experimental_faster?: boolean | Partial; + faster?: boolean | Partial; experimental_vcs?: VcsPreset | VcsConfig | boolean; } >; diff --git a/packages/docusaurus/src/commands/build/buildLocale.ts b/packages/docusaurus/src/commands/build/buildLocale.ts index 21175d55af79..483f347d1127 100644 --- a/packages/docusaurus/src/commands/build/buildLocale.ts +++ b/packages/docusaurus/src/commands/build/buildLocale.ts @@ -217,7 +217,7 @@ async function getBuildClientConfig({ const result = await createBuildClientConfig({ props, minify: cliOptions.minify ?? true, - faster: props.siteConfig.future.experimental_faster, + faster: props.siteConfig.future.faster, configureWebpackUtils, bundleAnalyzer: cliOptions.bundleAnalyzer ?? false, }); diff --git a/packages/docusaurus/src/commands/start/webpack.ts b/packages/docusaurus/src/commands/start/webpack.ts index b77a1cd44287..722198d84ba4 100644 --- a/packages/docusaurus/src/commands/start/webpack.ts +++ b/packages/docusaurus/src/commands/start/webpack.ts @@ -134,7 +134,7 @@ async function getStartClientConfig({ let {clientConfig: config} = await createStartClientConfig({ props, minify, - faster: props.siteConfig.future.experimental_faster, + faster: props.siteConfig.future.faster, poll, configureWebpackUtils, }); diff --git a/packages/docusaurus/src/server/__tests__/__snapshots__/config.test.ts.snap b/packages/docusaurus/src/server/__tests__/__snapshots__/config.test.ts.snap index 704bb6aee625..c0437a9e133a 100644 --- a/packages/docusaurus/src/server/__tests__/__snapshots__/config.test.ts.snap +++ b/packages/docusaurus/src/server/__tests__/__snapshots__/config.test.ts.snap @@ -8,7 +8,13 @@ exports[`loadSiteConfig website with .cjs siteConfig 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -19,13 +25,8 @@ exports[`loadSiteConfig website with .cjs siteConfig 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -94,7 +95,13 @@ exports[`loadSiteConfig website with ts + js config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -105,13 +112,8 @@ exports[`loadSiteConfig website with ts + js config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -180,7 +182,13 @@ exports[`loadSiteConfig website with valid JS CJS config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -191,13 +199,8 @@ exports[`loadSiteConfig website with valid JS CJS config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -266,7 +269,13 @@ exports[`loadSiteConfig website with valid JS ESM config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -277,13 +286,8 @@ exports[`loadSiteConfig website with valid JS ESM config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -352,7 +356,13 @@ exports[`loadSiteConfig website with valid TypeScript CJS config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -363,13 +373,8 @@ exports[`loadSiteConfig website with valid TypeScript CJS config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -438,7 +443,13 @@ exports[`loadSiteConfig website with valid TypeScript ESM config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -449,13 +460,8 @@ exports[`loadSiteConfig website with valid TypeScript ESM config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -524,7 +530,13 @@ exports[`loadSiteConfig website with valid async config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -535,13 +547,8 @@ exports[`loadSiteConfig website with valid async config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -612,7 +619,13 @@ exports[`loadSiteConfig website with valid async config creator function 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -623,13 +636,8 @@ exports[`loadSiteConfig website with valid async config creator function 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -700,7 +708,13 @@ exports[`loadSiteConfig website with valid config creator function 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -711,13 +725,8 @@ exports[`loadSiteConfig website with valid config creator function 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -791,7 +800,13 @@ exports[`loadSiteConfig website with valid siteConfig 1`] = ` "customFields": {}, "favicon": "img/docusaurus.ico", "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -802,13 +817,8 @@ exports[`loadSiteConfig website with valid siteConfig 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, diff --git a/packages/docusaurus/src/server/__tests__/__snapshots__/site.test.ts.snap b/packages/docusaurus/src/server/__tests__/__snapshots__/site.test.ts.snap index 08fc5ae5ca38..a6999ad02ad6 100644 --- a/packages/docusaurus/src/server/__tests__/__snapshots__/site.test.ts.snap +++ b/packages/docusaurus/src/server/__tests__/__snapshots__/site.test.ts.snap @@ -88,7 +88,13 @@ exports[`loadSite custom-i18n-site loads site 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -99,13 +105,8 @@ exports[`loadSite custom-i18n-site loads site 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -262,7 +263,13 @@ exports[`loadSite simple-site-with-baseUrl loads site - custom config 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -273,13 +280,8 @@ exports[`loadSite simple-site-with-baseUrl loads site - custom config 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -428,7 +430,13 @@ exports[`loadSite simple-site-with-baseUrl loads site - custom outDir 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -439,13 +447,8 @@ exports[`loadSite simple-site-with-baseUrl loads site - custom outDir 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -594,7 +597,13 @@ exports[`loadSite simple-site-with-baseUrl loads site 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -605,13 +614,8 @@ exports[`loadSite simple-site-with-baseUrl loads site 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -804,7 +808,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale fr + custom "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -815,13 +825,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale fr + custom "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -1036,7 +1041,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - custom outDir 1`] = "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -1047,13 +1058,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - custom outDir 1`] = "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -1268,7 +1274,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale de 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -1279,13 +1291,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale de 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -1500,7 +1507,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale en 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -1511,13 +1524,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale en 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -1732,7 +1740,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale es 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -1743,13 +1757,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale es 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -1964,7 +1973,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale fr 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -1975,13 +1990,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale fr 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -2196,7 +2206,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale it 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -2207,13 +2223,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site - locale it 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, @@ -2428,7 +2439,13 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site 1`] = ` "clientModules": [], "customFields": {}, "future": { - "experimental_faster": { + "experimental_router": "browser", + "experimental_vcs": { + "getFileCreationInfo": [Function], + "getFileLastUpdateInfo": [Function], + "initialize": [Function], + }, + "faster": { "gitEagerVcs": false, "lightningCssMinimizer": false, "mdxCrossCompilerCache": false, @@ -2439,13 +2456,8 @@ exports[`loadSite simple-site-with-baseUrl-i18n loads site 1`] = ` "swcJsLoader": false, "swcJsMinimizer": false, }, - "experimental_router": "browser", - "experimental_vcs": { - "getFileCreationInfo": [Function], - "getFileLastUpdateInfo": [Function], - "initialize": [Function], - }, "v4": { + "fasterByDefault": false, "removeLegacyPostBuildHeadAttribute": false, "siteStorageNamespacing": false, "useCssCascadeLayers": false, diff --git a/packages/docusaurus/src/server/__tests__/configValidation.test.ts b/packages/docusaurus/src/server/__tests__/configValidation.test.ts index 8b9287b74882..f3efd737005a 100644 --- a/packages/docusaurus/src/server/__tests__/configValidation.test.ts +++ b/packages/docusaurus/src/server/__tests__/configValidation.test.ts @@ -66,8 +66,9 @@ describe('normalizeConfig', () => { removeLegacyPostBuildHeadAttribute: true, useCssCascadeLayers: true, siteStorageNamespacing: true, + fasterByDefault: true, }, - experimental_faster: { + faster: { swcJsLoader: true, swcJsMinimizer: true, swcHtmlMinimizer: true, @@ -1139,6 +1140,20 @@ describe('storage', () => { `); }); + it('rejects future.experimental_faster', () => { + expect(() => + normalizeConfig({ + future: { + // @ts-expect-error: testing removed config + experimental_faster: true, + }, + }), + ).toThrowErrorMatchingInlineSnapshot(` + "The Docusaurus config \`future.experimental_faster\` has been renamed to \`future.faster\`. Please update your Docusaurus config. + " + `); + }); + describe('type', () => { it('accepts type', () => { const storage: Partial = { @@ -1332,8 +1347,9 @@ describe('future', () => { removeLegacyPostBuildHeadAttribute: true, useCssCascadeLayers: true, siteStorageNamespacing: true, + fasterByDefault: true, }, - experimental_faster: { + faster: { swcJsLoader: true, swcJsMinimizer: true, swcHtmlMinimizer: true, @@ -1648,7 +1664,7 @@ describe('future', () => { describe('faster', () => { function fasterContaining(faster: Partial) { return futureContaining({ - experimental_faster: expect.objectContaining(faster), + faster: expect.objectContaining(faster), }); } @@ -1656,7 +1672,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: undefined, + faster: undefined, }, }), ).toEqual(futureContaining(DEFAULT_FUTURE_CONFIG)); @@ -1665,7 +1681,7 @@ describe('future', () => { it('accepts faster - empty', () => { expect( normalizeConfig({ - future: {experimental_faster: {}}, + future: {faster: {}}, }), ).toEqual(futureContaining(DEFAULT_FUTURE_CONFIG)); }); @@ -1686,7 +1702,7 @@ describe('future', () => { normalizeConfig({ future: { v4: true, - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining(faster)); @@ -1695,7 +1711,7 @@ describe('future', () => { it('accepts faster - false', () => { expect( normalizeConfig({ - future: {experimental_faster: false}, + future: {faster: false}, }), ).toEqual(fasterContaining(DEFAULT_FASTER_CONFIG)); }); @@ -1705,7 +1721,7 @@ describe('future', () => { normalizeConfig({ future: { v4: true, - experimental_faster: true, + faster: true, }, }), ).toEqual(fasterContaining(DEFAULT_FASTER_CONFIG_TRUE)); @@ -1716,11 +1732,11 @@ describe('future', () => { normalizeConfig({ future: { v4: false, - experimental_faster: true, + faster: true, }, }), ).toThrowErrorMatchingInlineSnapshot(` - "Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. + "Docusaurus config \`future.faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\` All the v4 future flags are documented here: https://docusaurus.io/docs/api/docusaurus-config#future" `); @@ -1731,11 +1747,11 @@ describe('future', () => { normalizeConfig({ future: { v4: false, - experimental_faster: true, + faster: true, }, }), ).toThrowErrorMatchingInlineSnapshot(` - "Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. + "Docusaurus config \`future.faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\` All the v4 future flags are documented here: https://docusaurus.io/docs/api/docusaurus-config#future" `); @@ -1747,11 +1763,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster" must be one of [object, boolean] + ""future.faster" must be one of [object, boolean] " `); }); @@ -1764,7 +1780,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcJsLoader: false})); @@ -1777,7 +1793,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcJsLoader: true})); @@ -1790,7 +1806,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcJsLoader: false})); @@ -1802,11 +1818,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.swcJsLoader" must be a boolean + ""future.faster.swcJsLoader" must be a boolean " `); }); @@ -1817,11 +1833,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.swcJsLoader" must be a boolean + ""future.faster.swcJsLoader" must be a boolean " `); }); @@ -1835,7 +1851,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcJsMinimizer: false})); @@ -1848,7 +1864,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcJsMinimizer: true})); @@ -1861,7 +1877,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcJsMinimizer: false})); @@ -1873,11 +1889,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.swcJsMinimizer" must be a boolean + ""future.faster.swcJsMinimizer" must be a boolean " `); }); @@ -1888,11 +1904,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.swcJsMinimizer" must be a boolean + ""future.faster.swcJsMinimizer" must be a boolean " `); }); @@ -1906,7 +1922,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcHtmlMinimizer: false})); @@ -1919,7 +1935,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcHtmlMinimizer: true})); @@ -1932,7 +1948,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({swcHtmlMinimizer: false})); @@ -1944,11 +1960,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.swcHtmlMinimizer" must be a boolean + ""future.faster.swcHtmlMinimizer" must be a boolean " `); }); @@ -1959,11 +1975,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.swcHtmlMinimizer" must be a boolean + ""future.faster.swcHtmlMinimizer" must be a boolean " `); }); @@ -1977,7 +1993,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({lightningCssMinimizer: false})); @@ -1990,7 +2006,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({lightningCssMinimizer: true})); @@ -2003,7 +2019,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({lightningCssMinimizer: false})); @@ -2015,11 +2031,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.lightningCssMinimizer" must be a boolean + ""future.faster.lightningCssMinimizer" must be a boolean " `); }); @@ -2030,11 +2046,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.lightningCssMinimizer" must be a boolean + ""future.faster.lightningCssMinimizer" must be a boolean " `); }); @@ -2048,7 +2064,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({mdxCrossCompilerCache: false})); @@ -2061,7 +2077,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({mdxCrossCompilerCache: true})); @@ -2074,7 +2090,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({mdxCrossCompilerCache: false})); @@ -2086,11 +2102,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.mdxCrossCompilerCache" must be a boolean + ""future.faster.mdxCrossCompilerCache" must be a boolean " `); }); @@ -2101,11 +2117,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.mdxCrossCompilerCache" must be a boolean + ""future.faster.mdxCrossCompilerCache" must be a boolean " `); }); @@ -2119,7 +2135,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({rspackBundler: false})); @@ -2132,7 +2148,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({rspackBundler: true})); @@ -2145,7 +2161,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({rspackBundler: false})); @@ -2157,11 +2173,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.rspackBundler" must be a boolean + ""future.faster.rspackBundler" must be a boolean " `); }); @@ -2172,11 +2188,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.rspackBundler" must be a boolean + ""future.faster.rspackBundler" must be a boolean " `); }); @@ -2190,7 +2206,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({rspackPersistentCache: false})); @@ -2204,7 +2220,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({rspackPersistentCache: true})); @@ -2218,11 +2234,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot( - `"Docusaurus config flag \`future.experimental_faster.rspackPersistentCache\` requires the flag \`future.experimental_faster.rspackBundler\` to be turned on."`, + `"Docusaurus config flag \`future.faster.rspackPersistentCache\` requires the flag \`future.faster.rspackBundler\` to be turned on."`, ); }); @@ -2234,11 +2250,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot( - `"Docusaurus config flag \`future.experimental_faster.rspackPersistentCache\` requires the flag \`future.experimental_faster.rspackBundler\` to be turned on."`, + `"Docusaurus config flag \`future.faster.rspackPersistentCache\` requires the flag \`future.faster.rspackBundler\` to be turned on."`, ); }); @@ -2249,7 +2265,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({rspackPersistentCache: false})); @@ -2261,11 +2277,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.rspackPersistentCache" must be a boolean + ""future.faster.rspackPersistentCache" must be a boolean " `); }); @@ -2276,11 +2292,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.rspackPersistentCache" must be a boolean + ""future.faster.rspackPersistentCache" must be a boolean " `); }); @@ -2294,7 +2310,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({ssgWorkerThreads: false})); @@ -2308,7 +2324,7 @@ describe('future', () => { normalizeConfig({ future: { v4: true, - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({ssgWorkerThreads: true})); @@ -2322,11 +2338,11 @@ describe('future', () => { normalizeConfig({ future: { v4: false, - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - "Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. + "Docusaurus config \`future.faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\` All the v4 future flags are documented here: https://docusaurus.io/docs/api/docusaurus-config#future" `); @@ -2340,11 +2356,11 @@ describe('future', () => { normalizeConfig({ future: { v4: undefined, - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - "Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. + "Docusaurus config \`future.faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on. If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\` All the v4 future flags are documented here: https://docusaurus.io/docs/api/docusaurus-config#future" `); @@ -2357,7 +2373,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({ssgWorkerThreads: false})); @@ -2369,11 +2385,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.ssgWorkerThreads" must be a boolean + ""future.faster.ssgWorkerThreads" must be a boolean " `); }); @@ -2384,11 +2400,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.ssgWorkerThreads" must be a boolean + ""future.faster.ssgWorkerThreads" must be a boolean " `); }); @@ -2402,7 +2418,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual(fasterContaining({gitEagerVcs: false})); @@ -2415,12 +2431,12 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual( futureContaining({ - experimental_faster: expect.objectContaining(faster), + faster: expect.objectContaining(faster), experimental_vcs: getVcsPreset('default-v2'), }), ); @@ -2433,12 +2449,12 @@ describe('future', () => { expect( normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toEqual( futureContaining({ - experimental_faster: expect.objectContaining(faster), + faster: expect.objectContaining(faster), experimental_vcs: getVcsPreset('default-v1'), }), ); @@ -2450,11 +2466,11 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.gitEagerVcs" must be a boolean + ""future.faster.gitEagerVcs" must be a boolean " `); }); @@ -2465,15 +2481,58 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - experimental_faster: faster, + faster: faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` - ""future.experimental_faster.gitEagerVcs" must be a boolean + ""future.faster.gitEagerVcs" must be a boolean " `); }); }); + + it('v4.fasterByDefault defaults all faster flags to true', () => { + expect( + normalizeConfig({ + future: { + v4: { + fasterByDefault: true, + removeLegacyPostBuildHeadAttribute: true, + }, + }, + }), + ).toEqual(fasterContaining(DEFAULT_FASTER_CONFIG_TRUE)); + }); + + it('v4.fasterByDefault with partial faster keeps overrides', () => { + expect( + normalizeConfig({ + future: { + v4: { + fasterByDefault: true, + removeLegacyPostBuildHeadAttribute: true, + }, + faster: {swcJsLoader: false}, + }, + }), + ).toEqual( + fasterContaining({ + ...DEFAULT_FASTER_CONFIG_TRUE, + swcJsLoader: false, + }), + ); + }); + + it('faster: false overrides fasterByDefault', () => { + expect( + normalizeConfig({ + future: { + v4: {fasterByDefault: true}, + faster: false, + }, + }), + ).toEqual(fasterContaining(DEFAULT_FASTER_CONFIG)); + }); }); describe('v4', () => { @@ -2506,6 +2565,7 @@ describe('future', () => { removeLegacyPostBuildHeadAttribute: true, useCssCascadeLayers: true, siteStorageNamespacing: true, + fasterByDefault: true, }; expect( normalizeConfig({ @@ -2770,5 +2830,81 @@ describe('future', () => { `); }); }); + + describe('fasterByDefault', () => { + it('accepts - undefined', () => { + const v4: Partial = { + fasterByDefault: undefined, + }; + expect( + normalizeConfig({ + future: { + v4, + }, + }), + ).toEqual(v4Containing({fasterByDefault: false})); + }); + + it('accepts - true', () => { + const v4: Partial = { + fasterByDefault: true, + removeLegacyPostBuildHeadAttribute: true, + }; + expect( + normalizeConfig({ + future: { + v4, + }, + }), + ).toEqual(v4Containing({fasterByDefault: true})); + }); + + it('accepts - false', () => { + const v4: Partial = { + fasterByDefault: false, + }; + expect( + normalizeConfig({ + future: { + v4, + }, + }), + ).toEqual(v4Containing({fasterByDefault: false})); + }); + + it('rejects - null', () => { + const v4: Partial = { + // @ts-expect-error: invalid + fasterByDefault: null, + }; + expect(() => + normalizeConfig({ + future: { + v4, + }, + }), + ).toThrowErrorMatchingInlineSnapshot(` + ""future.v4.fasterByDefault" must be a boolean + " + `); + }); + + it('rejects - number', () => { + const v4: Partial = { + // @ts-expect-error: invalid + fasterByDefault: 42, + }; + expect(() => + normalizeConfig({ + future: { + v4, + }, + }), + ).toThrowErrorMatchingInlineSnapshot(` + ""future.v4.fasterByDefault" must be a boolean + " + `); + }); + }); }); }); diff --git a/packages/docusaurus/src/server/__tests__/siteMessages.test.ts b/packages/docusaurus/src/server/__tests__/siteMessages.test.ts index d50adc7ccada..d06145ee015e 100644 --- a/packages/docusaurus/src/server/__tests__/siteMessages.test.ts +++ b/packages/docusaurus/src/server/__tests__/siteMessages.test.ts @@ -29,7 +29,7 @@ describe('collectAllSiteMessages', () => { siteDir, siteConfig: { future: { - experimental_faster: { + faster: { swcJsLoader, }, }, diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index 9f64189efacc..a3fd44bdd98a 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -101,6 +101,7 @@ export const DEFAULT_FUTURE_V4_CONFIG: FutureV4Config = { removeLegacyPostBuildHeadAttribute: false, useCssCascadeLayers: false, siteStorageNamespacing: false, + fasterByDefault: false, }; // When using the "v4: true" shortcut @@ -108,11 +109,12 @@ export const DEFAULT_FUTURE_V4_CONFIG_TRUE: FutureV4Config = { removeLegacyPostBuildHeadAttribute: true, useCssCascadeLayers: true, siteStorageNamespacing: true, + fasterByDefault: true, }; export const DEFAULT_FUTURE_CONFIG: FutureConfig = { v4: DEFAULT_FUTURE_V4_CONFIG, - experimental_faster: DEFAULT_FASTER_CONFIG, + faster: DEFAULT_FASTER_CONFIG, experimental_vcs: getVcsPreset('default-v1'), experimental_router: 'browser', }; @@ -278,30 +280,21 @@ const I18N_CONFIG_SCHEMA = Joi.object({ .optional() .default(DEFAULT_I18N_CONFIG); +// Individual boolean defaults are not set here on purpose +// They are resolved in postProcessDocusaurusConfig based on +// the future.v4.fasterByDefault flag const FASTER_CONFIG_SCHEMA = Joi.alternatives() .try( Joi.object({ - swcJsLoader: Joi.boolean().default(DEFAULT_FASTER_CONFIG.swcJsLoader), - swcJsMinimizer: Joi.boolean().default( - DEFAULT_FASTER_CONFIG.swcJsMinimizer, - ), - swcHtmlMinimizer: Joi.boolean().default( - DEFAULT_FASTER_CONFIG.swcHtmlMinimizer, - ), - lightningCssMinimizer: Joi.boolean().default( - DEFAULT_FASTER_CONFIG.lightningCssMinimizer, - ), - mdxCrossCompilerCache: Joi.boolean().default( - DEFAULT_FASTER_CONFIG.mdxCrossCompilerCache, - ), - rspackBundler: Joi.boolean().default(DEFAULT_FASTER_CONFIG.rspackBundler), - rspackPersistentCache: Joi.boolean().default( - DEFAULT_FASTER_CONFIG.rspackPersistentCache, - ), - ssgWorkerThreads: Joi.boolean().default( - DEFAULT_FASTER_CONFIG.ssgWorkerThreads, - ), - gitEagerVcs: Joi.boolean().default(DEFAULT_FASTER_CONFIG.gitEagerVcs), + swcJsLoader: Joi.boolean(), + swcJsMinimizer: Joi.boolean(), + swcHtmlMinimizer: Joi.boolean(), + lightningCssMinimizer: Joi.boolean(), + mdxCrossCompilerCache: Joi.boolean(), + rspackBundler: Joi.boolean(), + rspackPersistentCache: Joi.boolean(), + ssgWorkerThreads: Joi.boolean(), + gitEagerVcs: Joi.boolean(), }), Joi.boolean() .required() @@ -309,8 +302,7 @@ const FASTER_CONFIG_SCHEMA = Joi.alternatives() bool ? DEFAULT_FASTER_CONFIG_TRUE : DEFAULT_FASTER_CONFIG, ), ) - .optional() - .default(DEFAULT_FASTER_CONFIG); + .optional(); const FUTURE_V4_SCHEMA = Joi.alternatives() .try( @@ -324,6 +316,9 @@ const FUTURE_V4_SCHEMA = Joi.alternatives() siteStorageNamespacing: Joi.boolean().default( DEFAULT_FUTURE_V4_CONFIG.siteStorageNamespacing, ), + fasterByDefault: Joi.boolean().default( + DEFAULT_FUTURE_V4_CONFIG.fasterByDefault, + ), }), Joi.boolean() .required() @@ -377,10 +372,10 @@ const VCS_CONFIG_SCHEMA = Joi.custom((input) => { }).default(true); const FUTURE_CONFIG_SCHEMA = Joi.object< - FutureConfig & {experimental_storage: never} + FutureConfig & {experimental_storage: never; experimental_faster: never} >({ v4: FUTURE_V4_SCHEMA, - experimental_faster: FASTER_CONFIG_SCHEMA, + faster: FASTER_CONFIG_SCHEMA, experimental_vcs: VCS_CONFIG_SCHEMA, experimental_router: Joi.string() .equal('browser', 'hash') @@ -394,6 +389,15 @@ const FUTURE_CONFIG_SCHEMA = Joi.object< 'storage', )} config attribute. Please move your storage config to the top level.`, }), + experimental_faster: Joi.any() + .forbidden() + .messages({ + 'any.unknown': `The Docusaurus config ${logger.code( + 'future.experimental_faster', + )} has been renamed to ${logger.code( + 'future.faster', + )}. Please update your Docusaurus config.`, + }), }) .optional() .default(DEFAULT_FUTURE_CONFIG); @@ -557,6 +561,29 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { config.storage.namespace = config.future.v4.siteStorageNamespacing; } + // Resolve faster config based on the v4.fasterByDefault flag + // undefined means "not explicitly set by user" + if (config.future.faster === undefined) { + config.future.faster = {} as FasterConfig; + } + const fasterDefault = config.future.v4.fasterByDefault; + const fasterKeys: (keyof FasterConfig)[] = [ + 'swcJsLoader', + 'swcJsMinimizer', + 'swcHtmlMinimizer', + 'lightningCssMinimizer', + 'mdxCrossCompilerCache', + 'rspackBundler', + 'rspackPersistentCache', + 'ssgWorkerThreads', + 'gitEagerVcs', + ]; + for (const key of fasterKeys) { + if (config.future.faster[key] === undefined) { + config.future.faster[key] = fasterDefault; + } + } + if (config.onBrokenMarkdownLinks) { logger.warn`The code=${'siteConfig.onBrokenMarkdownLinks'} config option is deprecated and will be removed in Docusaurus v4. Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBrokenMarkdownLinks'} instead.`; @@ -569,7 +596,7 @@ Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBroke // We normalize the VCS config when using a boolean value if (typeof config.future.experimental_vcs === 'boolean') { const vcsConfig = config.future.experimental_vcs - ? config.future.experimental_faster.gitEagerVcs + ? config.future.faster.gitEagerVcs ? getVcsPreset('default-v2') : getVcsPreset('default-v1') : getVcsPreset('disabled'); @@ -578,12 +605,12 @@ Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBroke } if ( - config.future.experimental_faster.ssgWorkerThreads && + config.future.faster.ssgWorkerThreads && !config.future.v4.removeLegacyPostBuildHeadAttribute ) { throw new Error( `Docusaurus config ${logger.code( - 'future.experimental_faster.ssgWorkerThreads', + 'future.faster.ssgWorkerThreads', )} requires the future flag ${logger.code( 'future.v4.removeLegacyPostBuildHeadAttribute', )} to be turned on. @@ -595,14 +622,14 @@ All the v4 future flags are documented here: https://docusaurus.io/docs/api/docu } if ( - config.future.experimental_faster.rspackPersistentCache && - !config.future.experimental_faster.rspackBundler + config.future.faster.rspackPersistentCache && + !config.future.faster.rspackBundler ) { throw new Error( `Docusaurus config flag ${logger.code( - 'future.experimental_faster.rspackPersistentCache', + 'future.faster.rspackPersistentCache', )} requires the flag ${logger.code( - 'future.experimental_faster.rspackBundler', + 'future.faster.rspackBundler', )} to be turned on.`, ); } diff --git a/packages/docusaurus/src/server/plugins/synthetic.ts b/packages/docusaurus/src/server/plugins/synthetic.ts index a79125c634ed..2d04973c014e 100644 --- a/packages/docusaurus/src/server/plugins/synthetic.ts +++ b/packages/docusaurus/src/server/plugins/synthetic.ts @@ -81,7 +81,7 @@ export async function createMDXFallbackPlugin({ }: LoadContext): Promise { const mdxLoaderItem = await createMDXLoaderItem({ useCrossCompilerCache: - siteConfig.future.experimental_faster.mdxCrossCompilerCache, + siteConfig.future.faster.mdxCrossCompilerCache, admonitions: true, staticDirs: siteConfig.staticDirectories.map((dir) => path.resolve(siteDir, dir), diff --git a/packages/docusaurus/src/server/siteMessages.ts b/packages/docusaurus/src/server/siteMessages.ts index e2b16d8c57cd..e012fec7021f 100644 --- a/packages/docusaurus/src/server/siteMessages.ts +++ b/packages/docusaurus/src/server/siteMessages.ts @@ -21,7 +21,7 @@ const uselessBabelConfigMessages: SiteMessageCreator = async ({site}) => { const { props: {siteDir, siteConfig}, } = site; - if (siteConfig.future.experimental_faster.swcJsLoader) { + if (siteConfig.future.faster.swcJsLoader) { const babelConfigFilePath = await getCustomBabelConfigFilePath(siteDir); if (babelConfigFilePath) { return [ diff --git a/packages/docusaurus/src/ssg/ssgExecutor.ts b/packages/docusaurus/src/ssg/ssgExecutor.ts index 0b4f7c703ab2..0c0165d2385b 100644 --- a/packages/docusaurus/src/ssg/ssgExecutor.ts +++ b/packages/docusaurus/src/ssg/ssgExecutor.ts @@ -201,7 +201,7 @@ export async function executeSSG({ return {collectedData: {}}; } - const createExecutor = props.siteConfig.future.experimental_faster + const createExecutor = props.siteConfig.future.faster .ssgWorkerThreads ? createPooledSSGExecutor : createSimpleSSGExecutor; diff --git a/packages/docusaurus/src/ssg/ssgParams.ts b/packages/docusaurus/src/ssg/ssgParams.ts index 90f219079673..5557dc0ff94c 100644 --- a/packages/docusaurus/src/ssg/ssgParams.ts +++ b/packages/docusaurus/src/ssg/ssgParams.ts @@ -61,7 +61,7 @@ export async function createSSGParams({ noIndex: props.siteConfig.noIndex, DOCUSAURUS_VERSION, serverBundlePath, - htmlMinifierType: props.siteConfig.future.experimental_faster + htmlMinifierType: props.siteConfig.future.faster .swcHtmlMinimizer ? 'swc' : 'terser', diff --git a/packages/docusaurus/src/webpack/base.ts b/packages/docusaurus/src/webpack/base.ts index 6cf165db4f47..e5b736634271 100644 --- a/packages/docusaurus/src/webpack/base.ts +++ b/packages/docusaurus/src/webpack/base.ts @@ -130,7 +130,7 @@ export async function createBaseConfig({ return disabledPersistentCacheValue; } if (props.currentBundler.name === 'rspack') { - if (props.siteConfig.future.experimental_faster.rspackPersistentCache) { + if (props.siteConfig.future.faster.rspackPersistentCache) { // Use cache: true + experiments.cache.type: "persistent" // See https://rspack.dev/config/experiments#persistent-cache return true; diff --git a/packages/docusaurus/src/webpack/server.ts b/packages/docusaurus/src/webpack/server.ts index 740c322c48f6..51ce1f954c0b 100644 --- a/packages/docusaurus/src/webpack/server.ts +++ b/packages/docusaurus/src/webpack/server.ts @@ -24,7 +24,7 @@ export default async function createServerConfig({ props, isServer: true, minify: false, - faster: props.siteConfig.future.experimental_faster, + faster: props.siteConfig.future.faster, configureWebpackUtils, }); diff --git a/website/docs/api/docusaurus.config.js.mdx b/website/docs/api/docusaurus.config.js.mdx index 6dd7bec969b9..b938917912c5 100644 --- a/website/docs/api/docusaurus.config.js.mdx +++ b/website/docs/api/docusaurus.config.js.mdx @@ -253,8 +253,9 @@ export default { removeLegacyPostBuildHeadAttribute: true, useCssCascadeLayers: true, siteStorageNamespacing: true, + fasterByDefault: true, }, - experimental_faster: { + faster: { swcJsLoader: true, swcJsMinimizer: true, swcHtmlMinimizer: true, @@ -273,7 +274,8 @@ export default { - [`removeLegacyPostBuildHeadAttribute`](https://github.com/facebook/docusaurus/pull/10435): Removes the legacy `plugin.postBuild({head})` API that prevents us from applying useful SSG optimizations ([explanations](https://github.com/facebook/docusaurus/pull/10850)). - [`useCssCascadeLayers`](https://github.com/facebook/docusaurus/pull/11142): This enables the [Docusaurus CSS Cascade Layers plugin](./plugins/plugin-css-cascade-layers.mdx) with pre-configured layers that we plan to apply by default for Docusaurus v4. - `siteStorageNamespacing`: Defaults the [`storage.namespace`](#storage) config to `true` instead of `false`. This enables automatic browser storage key namespacing, which avoids storage key conflicts when multiple Docusaurus sites are hosted under the same domain, or on localhost. -- `experimental_faster`: An object containing feature flags to make the Docusaurus build faster. This requires adding the `@docusaurus/faster` package to your site's dependencies. Use `true` as a shorthand to enable all flags. Read more on the [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556) issue. Available feature flags: + - `fasterByDefault`: Defaults all [`faster`](#faster) flags to `true` instead of `false`. This enables [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556) features by default. Requires having `@docusaurus/faster` in your dependencies. If you explicitly set individual `faster` flags, those explicit values take precedence. +- `faster`: An object containing feature flags to make the Docusaurus build faster. This requires adding the `@docusaurus/faster` package to your site's dependencies. Use `true` as a shorthand to enable all flags. Read more on the [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556) issue. Available feature flags: - [`swcJsLoader`](https://github.com/facebook/docusaurus/pull/10435): Use [SWC](https://swc.rs/) to transpile JS (instead of [Babel](https://babeljs.io/)). - [`swcJsMinimizer`](https://github.com/facebook/docusaurus/pull/10441): Use [SWC](https://swc.rs/) to minify JS (instead of [Terser](https://github.com/terser/terser)). - [`swcHtmlMinimizer `](https://github.com/facebook/docusaurus/pull/10554): Use [SWC](https://swc.rs/) to minify HTML and inlined JS/CSS (instead of [html-minifier-terser](https://github.com/terser/html-minifier-terser)). diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index f49ef0c0247b..7f541c1caf52 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -179,7 +179,7 @@ export default async function createConfigAsync() { url: 'https://docusaurus.io', future: { v4: !isSlower, // Not accurate, but good enough - experimental_faster: isSlower + faster: isSlower ? false : { // Verbose object: easier to independently test single attributes From 9788efa21a724509dd1f8162ff2860a1118ad45b Mon Sep 17 00:00:00 2001 From: slorber <749374+slorber@users.noreply.github.com> Date: Fri, 13 Mar 2026 11:09:30 +0000 Subject: [PATCH 02/17] refactor: apply lint autofix --- .../docusaurus-bundler/src/currentBundler.ts | 5 +- .../src/index.ts | 3 +- .../src/index.ts | 3 +- .../src/index.ts | 3 +- .../server/__tests__/configValidation.test.ts | 102 +++++++++--------- .../src/server/plugins/synthetic.ts | 3 +- packages/docusaurus/src/ssg/ssgExecutor.ts | 3 +- packages/docusaurus/src/ssg/ssgParams.ts | 3 +- 8 files changed, 58 insertions(+), 67 deletions(-) diff --git a/packages/docusaurus-bundler/src/currentBundler.ts b/packages/docusaurus-bundler/src/currentBundler.ts index 5e19894c8517..3d78005dda71 100644 --- a/packages/docusaurus-bundler/src/currentBundler.ts +++ b/packages/docusaurus-bundler/src/currentBundler.ts @@ -16,10 +16,7 @@ import type {CurrentBundler, DocusaurusConfig} from '@docusaurus/types'; // We inject a site config slice because the Rspack flag might change place type SiteConfigSlice = { future: { - faster: Pick< - DocusaurusConfig['future']['faster'], - 'rspackBundler' - >; + faster: Pick; }; }; diff --git a/packages/docusaurus-plugin-content-blog/src/index.ts b/packages/docusaurus-plugin-content-blog/src/index.ts index 25a84cfc35e3..fd5e4d4eed42 100644 --- a/packages/docusaurus-plugin-content-blog/src/index.ts +++ b/packages/docusaurus-plugin-content-blog/src/index.ts @@ -118,8 +118,7 @@ export default async function pluginContentBlog( const contentDirs = getContentPathList(contentPaths); const mdxLoaderItem = await createMDXLoaderItem({ - useCrossCompilerCache: - siteConfig.future.faster.mdxCrossCompilerCache, + useCrossCompilerCache: siteConfig.future.faster.mdxCrossCompilerCache, admonitions, remarkPlugins, rehypePlugins, diff --git a/packages/docusaurus-plugin-content-docs/src/index.ts b/packages/docusaurus-plugin-content-docs/src/index.ts index f87d8f123121..90975eff9860 100644 --- a/packages/docusaurus-plugin-content-docs/src/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/index.ts @@ -131,8 +131,7 @@ export default async function pluginContentDocs( }), ].filter((d): d is string => typeof d === 'string'), - useCrossCompilerCache: - siteConfig.future.faster.mdxCrossCompilerCache, + useCrossCompilerCache: siteConfig.future.faster.mdxCrossCompilerCache, admonitions: options.admonitions, remarkPlugins, rehypePlugins, diff --git a/packages/docusaurus-plugin-content-pages/src/index.ts b/packages/docusaurus-plugin-content-pages/src/index.ts index 49d044846266..9b6c770d348f 100644 --- a/packages/docusaurus-plugin-content-pages/src/index.ts +++ b/packages/docusaurus-plugin-content-pages/src/index.ts @@ -58,8 +58,7 @@ export default async function pluginContentPages( // Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970 .map(addTrailingPathSeparator), options: { - useCrossCompilerCache: - siteConfig.future.faster.mdxCrossCompilerCache, + useCrossCompilerCache: siteConfig.future.faster.mdxCrossCompilerCache, admonitions, remarkPlugins, rehypePlugins, diff --git a/packages/docusaurus/src/server/__tests__/configValidation.test.ts b/packages/docusaurus/src/server/__tests__/configValidation.test.ts index f3efd737005a..63c58e82da1e 100644 --- a/packages/docusaurus/src/server/__tests__/configValidation.test.ts +++ b/packages/docusaurus/src/server/__tests__/configValidation.test.ts @@ -1702,7 +1702,7 @@ describe('future', () => { normalizeConfig({ future: { v4: true, - faster: faster, + faster, }, }), ).toEqual(fasterContaining(faster)); @@ -1763,7 +1763,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1780,7 +1780,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcJsLoader: false})); @@ -1793,7 +1793,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcJsLoader: true})); @@ -1806,7 +1806,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcJsLoader: false})); @@ -1818,7 +1818,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1833,7 +1833,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1851,7 +1851,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcJsMinimizer: false})); @@ -1864,7 +1864,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcJsMinimizer: true})); @@ -1877,7 +1877,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcJsMinimizer: false})); @@ -1889,7 +1889,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1904,7 +1904,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1922,7 +1922,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcHtmlMinimizer: false})); @@ -1935,7 +1935,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcHtmlMinimizer: true})); @@ -1948,7 +1948,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({swcHtmlMinimizer: false})); @@ -1960,7 +1960,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1975,7 +1975,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -1993,7 +1993,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({lightningCssMinimizer: false})); @@ -2006,7 +2006,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({lightningCssMinimizer: true})); @@ -2019,7 +2019,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({lightningCssMinimizer: false})); @@ -2031,7 +2031,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2046,7 +2046,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2064,7 +2064,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({mdxCrossCompilerCache: false})); @@ -2077,7 +2077,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({mdxCrossCompilerCache: true})); @@ -2090,7 +2090,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({mdxCrossCompilerCache: false})); @@ -2102,7 +2102,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2117,7 +2117,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2135,7 +2135,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({rspackBundler: false})); @@ -2148,7 +2148,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({rspackBundler: true})); @@ -2161,7 +2161,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({rspackBundler: false})); @@ -2173,7 +2173,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2188,7 +2188,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2206,7 +2206,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({rspackPersistentCache: false})); @@ -2220,7 +2220,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({rspackPersistentCache: true})); @@ -2234,7 +2234,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot( @@ -2250,7 +2250,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot( @@ -2265,7 +2265,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({rspackPersistentCache: false})); @@ -2277,7 +2277,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2292,7 +2292,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2310,7 +2310,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({ssgWorkerThreads: false})); @@ -2324,7 +2324,7 @@ describe('future', () => { normalizeConfig({ future: { v4: true, - faster: faster, + faster, }, }), ).toEqual(fasterContaining({ssgWorkerThreads: true})); @@ -2338,7 +2338,7 @@ describe('future', () => { normalizeConfig({ future: { v4: false, - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2356,7 +2356,7 @@ describe('future', () => { normalizeConfig({ future: { v4: undefined, - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2373,7 +2373,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({ssgWorkerThreads: false})); @@ -2385,7 +2385,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2400,7 +2400,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2418,7 +2418,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual(fasterContaining({gitEagerVcs: false})); @@ -2431,7 +2431,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual( @@ -2449,7 +2449,7 @@ describe('future', () => { expect( normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toEqual( @@ -2466,7 +2466,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` @@ -2481,7 +2481,7 @@ describe('future', () => { expect(() => normalizeConfig({ future: { - faster: faster, + faster, }, }), ).toThrowErrorMatchingInlineSnapshot(` diff --git a/packages/docusaurus/src/server/plugins/synthetic.ts b/packages/docusaurus/src/server/plugins/synthetic.ts index 2d04973c014e..9d172b93a675 100644 --- a/packages/docusaurus/src/server/plugins/synthetic.ts +++ b/packages/docusaurus/src/server/plugins/synthetic.ts @@ -80,8 +80,7 @@ export async function createMDXFallbackPlugin({ siteConfig, }: LoadContext): Promise { const mdxLoaderItem = await createMDXLoaderItem({ - useCrossCompilerCache: - siteConfig.future.faster.mdxCrossCompilerCache, + useCrossCompilerCache: siteConfig.future.faster.mdxCrossCompilerCache, admonitions: true, staticDirs: siteConfig.staticDirectories.map((dir) => path.resolve(siteDir, dir), diff --git a/packages/docusaurus/src/ssg/ssgExecutor.ts b/packages/docusaurus/src/ssg/ssgExecutor.ts index 0c0165d2385b..c329a635ca6d 100644 --- a/packages/docusaurus/src/ssg/ssgExecutor.ts +++ b/packages/docusaurus/src/ssg/ssgExecutor.ts @@ -201,8 +201,7 @@ export async function executeSSG({ return {collectedData: {}}; } - const createExecutor = props.siteConfig.future.faster - .ssgWorkerThreads + const createExecutor = props.siteConfig.future.faster.ssgWorkerThreads ? createPooledSSGExecutor : createSimpleSSGExecutor; diff --git a/packages/docusaurus/src/ssg/ssgParams.ts b/packages/docusaurus/src/ssg/ssgParams.ts index 5557dc0ff94c..7a11633e044e 100644 --- a/packages/docusaurus/src/ssg/ssgParams.ts +++ b/packages/docusaurus/src/ssg/ssgParams.ts @@ -61,8 +61,7 @@ export async function createSSGParams({ noIndex: props.siteConfig.noIndex, DOCUSAURUS_VERSION, serverBundlePath, - htmlMinifierType: props.siteConfig.future.faster - .swcHtmlMinimizer + htmlMinifierType: props.siteConfig.future.faster.swcHtmlMinimizer ? 'swc' : 'terser', From 5f5cada411c7d35ddcf7ca896289d9816bcf9482 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 12:14:42 +0100 Subject: [PATCH 03/17] fix(docs): remove broken #faster anchor link in fasterByDefault docs Co-Authored-By: Claude Opus 4.6 --- website/docs/api/docusaurus.config.js.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/api/docusaurus.config.js.mdx b/website/docs/api/docusaurus.config.js.mdx index b938917912c5..8e0019f461aa 100644 --- a/website/docs/api/docusaurus.config.js.mdx +++ b/website/docs/api/docusaurus.config.js.mdx @@ -274,7 +274,7 @@ export default { - [`removeLegacyPostBuildHeadAttribute`](https://github.com/facebook/docusaurus/pull/10435): Removes the legacy `plugin.postBuild({head})` API that prevents us from applying useful SSG optimizations ([explanations](https://github.com/facebook/docusaurus/pull/10850)). - [`useCssCascadeLayers`](https://github.com/facebook/docusaurus/pull/11142): This enables the [Docusaurus CSS Cascade Layers plugin](./plugins/plugin-css-cascade-layers.mdx) with pre-configured layers that we plan to apply by default for Docusaurus v4. - `siteStorageNamespacing`: Defaults the [`storage.namespace`](#storage) config to `true` instead of `false`. This enables automatic browser storage key namespacing, which avoids storage key conflicts when multiple Docusaurus sites are hosted under the same domain, or on localhost. - - `fasterByDefault`: Defaults all [`faster`](#faster) flags to `true` instead of `false`. This enables [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556) features by default. Requires having `@docusaurus/faster` in your dependencies. If you explicitly set individual `faster` flags, those explicit values take precedence. + - `fasterByDefault`: Defaults all `future.faster` flags to `true` instead of `false`. This enables [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556) features by default. Requires having `@docusaurus/faster` in your dependencies. If you explicitly set individual `faster` flags, those explicit values take precedence. - `faster`: An object containing feature flags to make the Docusaurus build faster. This requires adding the `@docusaurus/faster` package to your site's dependencies. Use `true` as a shorthand to enable all flags. Read more on the [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556) issue. Available feature flags: - [`swcJsLoader`](https://github.com/facebook/docusaurus/pull/10435): Use [SWC](https://swc.rs/) to transpile JS (instead of [Babel](https://babeljs.io/)). - [`swcJsMinimizer`](https://github.com/facebook/docusaurus/pull/10441): Use [SWC](https://swc.rs/) to minify JS (instead of [Terser](https://github.com/terser/terser)). From 50073a12ffb0baf2cab493dc3c123fafcf747b93 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 12:45:31 +0100 Subject: [PATCH 04/17] =?UTF-8?q?fix(ci):=20add=20Yarn=20PnP=20packageExte?= =?UTF-8?q?nsion=20for=20@docusaurus/bundler=20=E2=86=92=20@docusaurus/fas?= =?UTF-8?q?ter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yarn PnP strict mode doesn't resolve optional dependencies automatically. Add a packageExtension so @docusaurus/bundler can resolve @docusaurus/faster in the e2e Yarn Berry tests. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests-e2e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 1ae61a878c01..f5e8fdd59560 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -149,6 +149,8 @@ jobs: # https://yarnpkg.com/features/pnp#fallback-mode yarn config set pnpFallbackMode none + yarn config set 'packageExtensions["@docusaurus/bundler@*"]' --json '{"dependencies":{"@docusaurus/faster":"*"}}' + yarn || yarn || yarn working-directory: ../test-website env: From 54b0a2b50b19527b3ffe48f2ab04f266a1d9d4ec Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 13:14:59 +0100 Subject: [PATCH 05/17] fix(core): declare @docusaurus/faster as optional peer dep instead of CI packageExtension Revert the packageExtensions workaround in the e2e CI workflow and instead declare @docusaurus/faster as an optional peer dependency of @docusaurus/core, matching the existing pattern in @docusaurus/bundler. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/tests-e2e.yml | 2 -- packages/docusaurus/package.json | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index f5e8fdd59560..1ae61a878c01 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -149,8 +149,6 @@ jobs: # https://yarnpkg.com/features/pnp#fallback-mode yarn config set pnpFallbackMode none - yarn config set 'packageExtensions["@docusaurus/bundler@*"]' --json '{"dependencies":{"@docusaurus/faster":"*"}}' - yarn || yarn || yarn working-directory: ../test-website env: diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 0ba34a2bfdd2..af4f4e8bb72e 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -90,10 +90,16 @@ "tree-node-cli": "^1.6.0" }, "peerDependencies": { + "@docusaurus/faster": "*", "@mdx-js/react": "^3.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, + "peerDependenciesMeta": { + "@docusaurus/faster": { + "optional": true + } + }, "engines": { "node": ">=20.0" } From 2e9be22925872b43bd337624b3f2de68b869b130 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 13:23:33 +0100 Subject: [PATCH 06/17] chore: retrigger CI Co-Authored-By: Claude Opus 4.6 From 8b2dc7fc2972bb4a37ca3f5bdc739109807d7ee2 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 14:33:51 +0100 Subject: [PATCH 07/17] empty From 3f51bd3a03e582bd45058e98e899a4bda01ab841 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 15:43:07 +0100 Subject: [PATCH 08/17] add randomness to e2e test script version, to avoid using cached versions when trying to run this locally --- admin/scripts/test-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/scripts/test-release.sh b/admin/scripts/test-release.sh index 53bbb868b1c4..942043436cb0 100755 --- a/admin/scripts/test-release.sh +++ b/admin/scripts/test-release.sh @@ -10,7 +10,7 @@ set -xeuo pipefail rm -rf ../test-website CUSTOM_REGISTRY_URL="http://localhost:4873" -NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version")-NEW" +NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version")-NEW-$RANDOM" CONTAINER_NAME="verdaccio" EXTRA_OPTS="" From 60ef64a1c1e8c6c4c312857356a401719c639a15 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 15:44:22 +0100 Subject: [PATCH 09/17] Rspack + PnP doesn't work, so add a warning in this case + fallback to Webpack This should fix the e2e pnp workflows --- packages/docusaurus/src/server/configValidation.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index a3fd44bdd98a..a5edf16af9dd 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -584,6 +584,19 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { } } + // Docusaurus Faster (Rspack) doesn't work with Yarn PnP :s + // Until we support Rspacl+PnP, we simply revert to Webpack with a warning + // See https://github.com/facebook/docusaurus/issues/10787 + if (process.versions.pnp) { + if (config.future.faster.rspackBundler) { + logger.warn(`The Docusaurus bundler Rspack doesn't support the Yarn PnP linker yet. +Your app will be built with Webpack instead of Rspack. +See also https://github.com/facebook/docusaurus/issues/10787`); + config.future.faster.rspackBundler = false; + config.future.faster.rspackPersistentCache = false; + } + } + if (config.onBrokenMarkdownLinks) { logger.warn`The code=${'siteConfig.onBrokenMarkdownLinks'} config option is deprecated and will be removed in Docusaurus v4. Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBrokenMarkdownLinks'} instead.`; From d7439781692a45b2a9dd10b392488e5572860e77 Mon Sep 17 00:00:00 2001 From: slorber <749374+slorber@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:50:54 +0000 Subject: [PATCH 10/17] refactor: apply lint autofix --- project-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/project-words.txt b/project-words.txt index a72e9528bc69..a0000a4ddffa 100644 --- a/project-words.txt +++ b/project-words.txt @@ -272,6 +272,7 @@ rsdoctor RSPACK Rspack rspack +Rspacl Rspress rtcts runneradmin From df367cee867edd03165a60fd0fc53ac2ab9f4215 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 15:58:33 +0100 Subject: [PATCH 11/17] typo --- packages/docusaurus/src/server/configValidation.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index a5edf16af9dd..59e3c14a5bec 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -585,15 +585,15 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { } // Docusaurus Faster (Rspack) doesn't work with Yarn PnP :s - // Until we support Rspacl+PnP, we simply revert to Webpack with a warning + // Until we support Rspack + PnP, we simply revert to Webpack with a warning // See https://github.com/facebook/docusaurus/issues/10787 if (process.versions.pnp) { if (config.future.faster.rspackBundler) { logger.warn(`The Docusaurus bundler Rspack doesn't support the Yarn PnP linker yet. Your app will be built with Webpack instead of Rspack. See also https://github.com/facebook/docusaurus/issues/10787`); - config.future.faster.rspackBundler = false; - config.future.faster.rspackPersistentCache = false; + config.future.faster.rspackBundler = true; + config.future.faster.rspackPersistentCache = true; } } From ab66719c7b44a4e65bfa32f21dec0c26ed016444 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 15:59:03 +0100 Subject: [PATCH 12/17] typo --- project-words.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/project-words.txt b/project-words.txt index a0000a4ddffa..a72e9528bc69 100644 --- a/project-words.txt +++ b/project-words.txt @@ -272,7 +272,6 @@ rsdoctor RSPACK Rspack rspack -Rspacl Rspress rtcts runneradmin From 742598c583e171a925093782ac498224e36cfbbd Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 16:01:15 +0100 Subject: [PATCH 13/17] revert wrong change --- packages/docusaurus/src/server/configValidation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index 59e3c14a5bec..3dcacde0e347 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -592,8 +592,8 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { logger.warn(`The Docusaurus bundler Rspack doesn't support the Yarn PnP linker yet. Your app will be built with Webpack instead of Rspack. See also https://github.com/facebook/docusaurus/issues/10787`); - config.future.faster.rspackBundler = true; - config.future.faster.rspackPersistentCache = true; + config.future.faster.rspackBundler = false; + config.future.faster.rspackPersistentCache = false; } } From ce16459319980c3b621e6b862c4eefb4e5fccfa4 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 16:17:19 +0100 Subject: [PATCH 14/17] also use slower minimizers --- packages/docusaurus/src/server/configValidation.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index 3dcacde0e347..54a0408af289 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -584,16 +584,22 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { } } - // Docusaurus Faster (Rspack) doesn't work with Yarn PnP :s + // Docusaurus Faster doesn't fully support Yarn PnP :s // Until we support Rspack + PnP, we simply revert to Webpack with a warning // See https://github.com/facebook/docusaurus/issues/10787 if (process.versions.pnp) { if (config.future.faster.rspackBundler) { - logger.warn(`The Docusaurus bundler Rspack doesn't support the Yarn PnP linker yet. -Your app will be built with Webpack instead of Rspack. + logger.warn(`Docusaurus Faster doesn't fully support the Yarn PnP linker yet. +We recommend to use Yarn node-linker instead. +Docusaurus will still attempt to build your app with Webpack (instead of Rspack) and use slower minimizers. See also https://github.com/facebook/docusaurus/issues/10787`); config.future.faster.rspackBundler = false; config.future.faster.rspackPersistentCache = false; + + // This also won't work due to Webpack peerDependencies :s + // This could eventually work if the deps are added at the site level + config.future.faster.lightningCssMinimizer = false; + config.future.faster.swcJsMinimizer = false; } } From 59c35317a1346b3968bf7d938e5d241098ec39bc Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 16:18:51 +0100 Subject: [PATCH 15/17] comment --- packages/docusaurus/src/server/configValidation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index 54a0408af289..8825705aa8a6 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -596,8 +596,9 @@ See also https://github.com/facebook/docusaurus/issues/10787`); config.future.faster.rspackBundler = false; config.future.faster.rspackPersistentCache = false; - // This also won't work due to Webpack peerDependencies :s + // This also won't work due to Webpack libs using peerDependencies :s // This could eventually work if the deps are added at the site level + // TODO Docusaurus v4 clean this up config.future.faster.lightningCssMinimizer = false; config.future.faster.swcJsMinimizer = false; } From 5e2ff1b31f9a74d1fb11c2114714b6664f0b50ab Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 16:44:27 +0100 Subject: [PATCH 16/17] restore snapshots --- .../__snapshots__/index.test.ts.snap | 5582 ++++++++++++++--- 1 file changed, 4538 insertions(+), 1044 deletions(-) diff --git a/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap index 5db8b61f4e4d..c10fc2b03f0e 100644 --- a/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap +++ b/packages/docusaurus-plugin-content-docs/src/__tests__/__snapshots__/index.test.ts.snap @@ -453,797 +453,3087 @@ exports[`simple website content 5`] = ` } `; -exports[`site with custom sidebar items generator sidebar is autogenerated according to a custom sidebarItemsGenerator 1`] = ` +exports[`simple website content: data 1`] = ` { - "defaultSidebar": [ - { - "id": "API/api-overview", - "type": "doc", + "site-docs-custom-last-update-md-b8d.json": { + "description": "Custom last update", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "last_update": { + "author": "Custom Author (processed by parseFrontMatter)", + "date": "1/1/2000", + }, + "title": "Custom Last Update", }, - { - "id": "API/api-end", - "type": "doc", + "id": "customLastUpdate", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/customLastUpdate", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/customLastUpdate", + "source": "@site/docs/customLastUpdate.md", + "sourceDirName": ".", + "tags": [], + "title": "Custom Last Update", + "unlisted": false, + "version": "current", + }, + "site-docs-doc-draft-md-584.json": { + "description": "This is a draft document", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "draft": true, }, - ], -} -`; - -exports[`site with custom sidebar items generator sidebarItemsGenerator can wrap/enhance/sort/reverse the default sidebar generator 1`] = ` -{ - "defaultSidebar": [ - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/api-end", - "type": "doc", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/Extension APIs/Theme API", - "type": "doc", - }, - { - "id": "API/Extension APIs/Plugin API", - "type": "doc", - }, - ], - "label": "Extension APIs (label from _category_.yml)", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/Core APIs/Server API", - "type": "doc", - }, - { - "id": "API/Core APIs/Client API", - "type": "doc", - }, - ], - "label": "Core APIs", - "link": undefined, - "type": "category", - }, - { - "id": "API/api-overview", - "type": "doc", - }, - ], - "label": "API (label from _category_.json)", - "link": undefined, - "type": "category", + "id": "doc-draft", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/doc-draft", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/doc-draft", + "source": "@site/docs/doc-draft.md", + "sourceDirName": ".", + "tags": [], + "title": "doc-draft", + "unlisted": false, + "version": "current", + }, + "site-docs-doc-unlisted-md-80b.json": { + "description": "This is an unlisted document", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "unlisted": true, }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "Guides/guide5", - "type": "doc", - }, - { - "id": "Guides/guide4", - "type": "doc", - }, - { - "id": "Guides/guide3", - "type": "doc", - }, - { - "id": "Guides/guide2.5", - "type": "doc", - }, - { - "id": "Guides/guide2", - "type": "doc", - }, + "id": "doc-unlisted", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/foo/bazSlug.html", + "title": "baz pagination_label", + }, + "permalink": "/docs/doc-unlisted", + "previous": { + "permalink": "/docs/foo/bar", + "title": "Bar", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/doc-unlisted", + "source": "@site/docs/doc-unlisted.md", + "sourceDirName": ".", + "tags": [], + "title": "doc-unlisted", + "unlisted": false, + "version": "current", + }, + "site-docs-doc-with-space-md-e90.json": { + "description": "", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "doc with space", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/doc with space", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/doc with space", + "source": "@site/docs/doc with space.md", + "sourceDirName": ".", + "tags": [], + "title": "Hoo hoo, if this path tricks you...", + "unlisted": false, + "version": "current", + }, + "site-docs-foo-bar-md-8c2.json": { + "description": "This is custom description", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "description": "This is custom description", + "id": "bar", + "pagination_next": null, + "pagination_prev": null, + "title": "Bar", + }, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/foo/bar", + "previous": undefined, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/bar", + "source": "@site/docs/foo/bar.md", + "sourceDirName": "foo", + "tags": [], + "title": "Bar", + "unlisted": false, + "version": "current", + }, + "site-docs-foo-baz-md-a69.json": { + "description": "Images", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "baz", + "pagination_label": "baz pagination_label", + "slug": "bazSlug.html", + "tags": [ + "tag 1", + "globalTag1", + "tag-1", { - "id": "Guides/guide1", - "type": "doc", + "label": "tag 2", + "permalink": "tag2-custom-permalink", }, ], - "label": "Guides", - "link": undefined, - "type": "category", + "title": "baz", }, - { - "id": "installation", - "type": "doc", + "id": "foo/baz", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/unlisted-category/", + "title": "unlisted-category-index", }, - { - "id": "getting-started", - "type": "doc", + "permalink": "/docs/foo/bazSlug.html", + "previous": { + "permalink": "/docs/doc-unlisted", + "title": "doc-unlisted", }, - ], -} -`; - -exports[`site with custom sidebar items generator sidebarItemsGenerator is called with appropriate data 1`] = ` -{ - "categoriesMetadata": { - "3-API": { - "label": "API (label from _category_.json)", + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/bazSlug.html", + "source": "@site/docs/foo/baz.md", + "sourceDirName": "foo", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "tag 1", + "permalink": "/docs/tags/tag-1", + }, + { + "description": "Global Tag 1 description", + "inline": false, + "label": "Global Tag 1 label", + "permalink": "/docs/tags/global-tag-1-permalink", + }, + { + "description": undefined, + "inline": true, + "label": "tag-1", + "permalink": "/docs/tags/tag-1", + }, + { + "description": undefined, + "inline": true, + "label": "tag 2", + "permalink": "/docs/tags/tag2-custom-permalink", + }, + ], + "title": "baz", + "unlisted": false, + "version": "current", + }, + "site-docs-heading-as-title-md-c6d.json": { + "description": "", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "headingAsTitle", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/", + "title": "Hello sidebar_label", }, - "3-API/02_Extension APIs": { - "label": "Extension APIs (label from _category_.yml)", + "permalink": "/docs/headingAsTitle", + "previous": { + "permalink": "/docs/rootTryToEscapeSlug", + "title": "rootTryToEscapeSlug", }, - "Guides": { - "position": 2, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/headingAsTitle", + "source": "@site/docs/headingAsTitle.md", + "sourceDirName": ".", + "tags": [], + "title": "My heading as title", + "unlisted": false, + "version": "current", + }, + "site-docs-hello-md-9df.json": { + "description": "Hi, Endilie here :)", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "hello", + "sidebar_label": "Hello sidebar_label", + "slug": "/", + "tags": [ + "tag-1", + "tag 3", + ], + "title": "Hello, World !", }, + "id": "hello", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/", + "previous": { + "permalink": "/docs/headingAsTitle", + "title": "My heading as title", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/docs/hello.md", + "sourceDirName": ".", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "tag-1", + "permalink": "/docs/tags/tag-1", + }, + { + "description": undefined, + "inline": true, + "label": "tag 3", + "permalink": "/docs/tags/tag-3", + }, + ], + "title": "Hello, World !", + "unlisted": false, + "version": "current", }, - "defaultSidebarItemsGenerator": [Function], - "docs": [ - { - "frontMatter": {}, - "id": "API/Core APIs/Client API", - "sidebarPosition": 0, - "source": "@site/docs/3-API/01_Core APIs/0 --- Client API.md", - "sourceDirName": "3-API/01_Core APIs", - "title": "Client API", + "site-docs-ipsum-md-c61.json": { + "description": "Lorem ipsum.", + "draft": false, + "editUrl": null, + "frontMatter": { + "custom_edit_url": null, + "pagination_next": "doc-unlisted", }, - { - "frontMatter": {}, - "id": "API/Core APIs/Server API", - "sidebarPosition": 1, - "source": "@site/docs/3-API/01_Core APIs/1 --- Server API.md", - "sourceDirName": "3-API/01_Core APIs", - "title": "Server API", + "id": "ipsum", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/doc-unlisted", + "title": "doc-unlisted", }, - { - "frontMatter": {}, - "id": "API/Extension APIs/Plugin API", - "sidebarPosition": 0, - "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", - "sourceDirName": "3-API/02_Extension APIs", - "title": "Plugin API", + "permalink": "/docs/ipsum", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/ipsum", + "source": "@site/docs/ipsum.md", + "sourceDirName": ".", + "tags": [], + "title": "ipsum", + "unlisted": false, + "version": "current", + }, + "site-docs-last-update-author-only-md-352.json": { + "description": "Only custom author, so it will still use the date from Git", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "last_update": { + "author": "Custom Author (processed by parseFrontMatter)", + }, + "title": "Last Update Author Only", }, - { - "frontMatter": {}, - "id": "API/Extension APIs/Theme API", - "sidebarPosition": 1, - "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", - "sourceDirName": "3-API/02_Extension APIs", - "title": "Theme API", + "id": "lastUpdateAuthorOnly", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/lastUpdateAuthorOnly", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/lastUpdateAuthorOnly", + "source": "@site/docs/lastUpdateAuthorOnly.md", + "sourceDirName": ".", + "tags": [], + "title": "Last Update Author Only", + "unlisted": false, + "version": "current", + }, + "site-docs-last-update-date-only-md-987.json": { + "description": "Only custom date, so it will still use the author from Git", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "last_update": { + "date": "1/1/2000", + }, + "title": "Last Update Date Only", }, - { - "frontMatter": {}, - "id": "API/api-end", - "sidebarPosition": 3, - "source": "@site/docs/3-API/03_api-end.md", - "sourceDirName": "3-API", - "title": "API End", + "id": "lastUpdateDateOnly", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/lastUpdateDateOnly", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/lastUpdateDateOnly", + "source": "@site/docs/lastUpdateDateOnly.md", + "sourceDirName": ".", + "tags": [], + "title": "Last Update Date Only", + "unlisted": false, + "version": "current", + }, + "site-docs-lorem-md-b27.json": { + "description": "Lorem ipsum.", + "draft": false, + "editUrl": "https://github.com/customUrl/docs/lorem.md", + "frontMatter": { + "custom_edit_url": "https://github.com/customUrl/docs/lorem.md", + "unrelated_front_matter": "won't be part of metadata", }, - { - "frontMatter": {}, - "id": "API/api-overview", - "sidebarPosition": 0, - "source": "@site/docs/3-API/00_api-overview.md", - "sourceDirName": "3-API", - "title": "API Overview", + "id": "lorem", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/lorem", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/lorem", + "source": "@site/docs/lorem.md", + "sourceDirName": ".", + "tags": [], + "title": "lorem", + "unlisted": false, + "version": "current", + }, + "site-docs-root-absolute-slug-md-db5.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "pagination_next": "headingAsTitle", + "pagination_prev": "foo/baz", + "slug": "/rootAbsoluteSlug", }, - { - "frontMatter": { - "id": "guide1", - "sidebar_position": 1, - }, - "id": "Guides/guide1", - "sidebarPosition": 1, - "source": "@site/docs/Guides/z-guide1.md", - "sourceDirName": "Guides", - "title": "Guide 1", + "id": "rootAbsoluteSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/headingAsTitle", + "title": "My heading as title", }, - { - "frontMatter": { - "id": "guide2", - }, - "id": "Guides/guide2", - "sidebarPosition": 2, - "source": "@site/docs/Guides/02-guide2.md", - "sourceDirName": "Guides", - "title": "Guide 2", + "permalink": "/docs/rootAbsoluteSlug", + "previous": { + "permalink": "/docs/foo/bazSlug.html", + "title": "baz pagination_label", }, - { - "frontMatter": { - "id": "guide2.5", - "sidebar_position": 2.5, - }, - "id": "Guides/guide2.5", - "sidebarPosition": 2.5, - "source": "@site/docs/Guides/0-guide2.5.md", - "sourceDirName": "Guides", - "title": "Guide 2.5", + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/rootAbsoluteSlug", + "source": "@site/docs/rootAbsoluteSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootAbsoluteSlug", + "unlisted": false, + "version": "current", + }, + "site-docs-root-relative-slug-md-3dd.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "pagination_next": "headingAsTitle", + "pagination_prev": "foo/baz", + "slug": "rootRelativeSlug", }, - { - "frontMatter": { - "id": "guide3", - "sidebar_position": 3, - }, - "id": "Guides/guide3", - "sidebarPosition": 3, - "source": "@site/docs/Guides/guide3.md", - "sourceDirName": "Guides", - "title": "Guide 3", + "id": "rootRelativeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/headingAsTitle", + "title": "My heading as title", }, - { - "frontMatter": { - "id": "guide4", - }, - "id": "Guides/guide4", - "sidebarPosition": undefined, - "source": "@site/docs/Guides/a-guide4.md", - "sourceDirName": "Guides", - "title": "Guide 4", + "permalink": "/docs/rootRelativeSlug", + "previous": { + "permalink": "/docs/foo/bazSlug.html", + "title": "baz pagination_label", }, - { - "frontMatter": { - "id": "guide5", - }, - "id": "Guides/guide5", - "sidebarPosition": undefined, - "source": "@site/docs/Guides/b-guide5.md", - "sourceDirName": "Guides", - "title": "Guide 5", + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/rootRelativeSlug", + "source": "@site/docs/rootRelativeSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootRelativeSlug", + "unlisted": false, + "version": "current", + }, + "site-docs-root-resolved-slug-md-4d1.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "pagination_next": "headingAsTitle", + "pagination_prev": "foo/baz", + "slug": "./hey/ho/../rootResolvedSlug", }, - { - "frontMatter": {}, - "id": "getting-started", - "sidebarPosition": 0, - "source": "@site/docs/0-getting-started.md", - "sourceDirName": ".", - "title": "Getting Started", + "id": "rootResolvedSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/headingAsTitle", + "title": "My heading as title", }, - { - "frontMatter": {}, - "id": "installation", - "sidebarPosition": 1, - "source": "@site/docs/1-installation.md", - "sourceDirName": ".", - "title": "Installation", + "permalink": "/docs/hey/rootResolvedSlug", + "previous": { + "permalink": "/docs/foo/bazSlug.html", + "title": "baz pagination_label", }, - ], - "isCategoryIndex": [Function], - "item": { - "dirName": ".", - "type": "autogenerated", - }, - "numberPrefixParser": [Function], - "version": { - "contentPath": "docs", - "versionName": "current", - }, -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 1`] = ` -{ - "description": "Getting started text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "getting-started", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/installation", - "title": "Installation", - }, - "permalink": "/docs/getting-started", - "previous": undefined, - "sidebar": "defaultSidebar", - "sidebarPosition": 0, - "slug": "/getting-started", - "source": "@site/docs/0-getting-started.md", - "sourceDirName": ".", - "tags": [], - "title": "Getting Started", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 2`] = ` -{ - "description": "Installation text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "installation", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide1", - "title": "Guide 1", - }, - "permalink": "/docs/installation", - "previous": { - "permalink": "/docs/getting-started", - "title": "Getting Started", - }, - "sidebar": "defaultSidebar", - "sidebarPosition": 1, - "slug": "/installation", - "source": "@site/docs/1-installation.md", - "sourceDirName": ".", - "tags": [], - "title": "Installation", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 3`] = ` -{ - "description": "Guide 1 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide1", - "sidebar_position": 1, - }, - "id": "Guides/guide1", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide2", - "title": "Guide 2", - }, - "permalink": "/docs/Guides/guide1", - "previous": { - "permalink": "/docs/installation", - "title": "Installation", - }, - "sidebar": "defaultSidebar", - "sidebarPosition": 1, - "slug": "/Guides/guide1", - "source": "@site/docs/Guides/z-guide1.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 1", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 4`] = ` -{ - "description": "Guide 2 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide2", - }, - "id": "Guides/guide2", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide2.5", - "title": "Guide 2.5", + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/hey/rootResolvedSlug", + "source": "@site/docs/rootResolvedSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootResolvedSlug", + "unlisted": false, + "version": "current", }, - "permalink": "/docs/Guides/guide2", - "previous": { - "permalink": "/docs/Guides/guide1", - "title": "Guide 1", + "site-docs-root-try-to-escape-slug-md-9ee.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "pagination_next": "headingAsTitle", + "pagination_prev": "foo/baz", + "slug": "../../../../../../../../rootTryToEscapeSlug", + }, + "id": "rootTryToEscapeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/headingAsTitle", + "title": "My heading as title", + }, + "permalink": "/docs/rootTryToEscapeSlug", + "previous": { + "permalink": "/docs/foo/bazSlug.html", + "title": "baz pagination_label", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/rootTryToEscapeSlug", + "source": "@site/docs/rootTryToEscapeSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootTryToEscapeSlug", + "unlisted": false, + "version": "current", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 2, - "slug": "/Guides/guide2", - "source": "@site/docs/Guides/02-guide2.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 2", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 5`] = ` -{ - "description": "Guide 2.5 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide2.5", - "sidebar_position": 2.5, + "site-docs-slugs-absolute-slug-md-4e8.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/absoluteSlug", + }, + "id": "slugs/absoluteSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/absoluteSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/absoluteSlug", + "source": "@site/docs/slugs/absoluteSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "absoluteSlug", + "unlisted": false, + "version": "current", }, - "id": "Guides/guide2.5", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide3", - "title": "Guide 3", + "site-docs-slugs-relative-slug-md-d1c.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "relativeSlug", + }, + "id": "slugs/relativeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/slugs/relativeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/slugs/relativeSlug", + "source": "@site/docs/slugs/relativeSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "relativeSlug", + "unlisted": false, + "version": "current", }, - "permalink": "/docs/Guides/guide2.5", - "previous": { - "permalink": "/docs/Guides/guide2", - "title": "Guide 2", + "site-docs-slugs-resolved-slug-md-02b.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "./hey/ho/../resolvedSlug", + }, + "id": "slugs/resolvedSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/slugs/hey/resolvedSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/slugs/hey/resolvedSlug", + "source": "@site/docs/slugs/resolvedSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "resolvedSlug", + "unlisted": false, + "version": "current", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 2.5, - "slug": "/Guides/guide2.5", - "source": "@site/docs/Guides/0-guide2.5.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 2.5", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 6`] = ` -{ - "description": "Guide 3 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide3", - "sidebar_position": 3, + "site-docs-slugs-try-to-escape-slug-md-70d.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "../../../../../../../../tryToEscapeSlug", + }, + "id": "slugs/tryToEscapeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/tryToEscapeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/tryToEscapeSlug", + "source": "@site/docs/slugs/tryToEscapeSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "tryToEscapeSlug", + "unlisted": false, + "version": "current", }, - "id": "Guides/guide3", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide4", - "title": "Guide 4", + "site-docs-unlisted-category-index-md-efa.json": { + "description": "This is an unlisted category index", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "unlisted-category-index", + "unlisted": true, + }, + "id": "unlisted-category/unlisted-category-index", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/unlisted-category/unlisted-category-doc", + "title": "unlisted-category-doc", + }, + "permalink": "/docs/unlisted-category/", + "previous": { + "permalink": "/docs/foo/bazSlug.html", + "title": "baz pagination_label", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/unlisted-category/", + "source": "@site/docs/unlisted-category/index.md", + "sourceDirName": "unlisted-category", + "tags": [], + "title": "unlisted-category-index", + "unlisted": false, + "version": "current", }, - "permalink": "/docs/Guides/guide3", - "previous": { - "permalink": "/docs/Guides/guide2.5", - "title": "Guide 2.5", + "site-docs-unlisted-category-unlisted-category-doc-md-bd6.json": { + "description": "This is an unlisted category doc", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "unlisted-category-doc", + "unlisted": true, + }, + "id": "unlisted-category/unlisted-category-doc", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/category/slugs", + "title": "Slugs", + }, + "permalink": "/docs/unlisted-category/unlisted-category-doc", + "previous": { + "permalink": "/docs/unlisted-category/", + "title": "unlisted-category-index", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/unlisted-category/unlisted-category-doc", + "source": "@site/docs/unlisted-category/unlisted-category-doc.md", + "sourceDirName": "unlisted-category", + "tags": [], + "title": "unlisted-category-doc", + "unlisted": false, + "version": "current", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 3, - "slug": "/Guides/guide3", - "source": "@site/docs/Guides/guide3.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 3", - "unlisted": false, - "version": "current", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 7`] = ` +exports[`simple website content: global data 1`] = ` { - "description": "Guide 4 text", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "id": "guide4", - }, - "id": "Guides/guide4", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/Guides/guide5", - "title": "Guide 5", - }, - "permalink": "/docs/Guides/guide4", - "previous": { - "permalink": "/docs/Guides/guide3", - "title": "Guide 3", - }, - "sidebar": "defaultSidebar", - "sidebarPosition": undefined, - "slug": "/Guides/guide4", - "source": "@site/docs/Guides/a-guide4.md", - "sourceDirName": "Guides", - "tags": [], - "title": "Guide 4", - "unlisted": false, - "version": "current", + "pluginName": { + "pluginId": { + "breadcrumbs": true, + "path": "/docs", + "versions": [ + { + "docs": [ + { + "id": "customLastUpdate", + "path": "/docs/customLastUpdate", + "sidebar": undefined, + }, + { + "id": "doc with space", + "path": "/docs/doc with space", + "sidebar": undefined, + }, + { + "id": "doc-draft", + "path": "/docs/doc-draft", + "sidebar": undefined, + }, + { + "id": "doc-unlisted", + "path": "/docs/doc-unlisted", + "sidebar": "docs", + }, + { + "id": "foo/bar", + "path": "/docs/foo/bar", + "sidebar": "docs", + }, + { + "id": "foo/baz", + "path": "/docs/foo/bazSlug.html", + "sidebar": "docs", + }, + { + "id": "headingAsTitle", + "path": "/docs/headingAsTitle", + "sidebar": "docs", + }, + { + "id": "hello", + "path": "/docs/", + "sidebar": "docs", + }, + { + "id": "ipsum", + "path": "/docs/ipsum", + "sidebar": undefined, + }, + { + "id": "lastUpdateAuthorOnly", + "path": "/docs/lastUpdateAuthorOnly", + "sidebar": undefined, + }, + { + "id": "lastUpdateDateOnly", + "path": "/docs/lastUpdateDateOnly", + "sidebar": undefined, + }, + { + "id": "lorem", + "path": "/docs/lorem", + "sidebar": undefined, + }, + { + "id": "rootAbsoluteSlug", + "path": "/docs/rootAbsoluteSlug", + "sidebar": "docs", + }, + { + "id": "rootRelativeSlug", + "path": "/docs/rootRelativeSlug", + "sidebar": "docs", + }, + { + "id": "rootResolvedSlug", + "path": "/docs/hey/rootResolvedSlug", + "sidebar": "docs", + }, + { + "id": "rootTryToEscapeSlug", + "path": "/docs/rootTryToEscapeSlug", + "sidebar": "docs", + }, + { + "id": "slugs/absoluteSlug", + "path": "/docs/absoluteSlug", + "sidebar": undefined, + }, + { + "id": "slugs/relativeSlug", + "path": "/docs/slugs/relativeSlug", + "sidebar": undefined, + }, + { + "id": "slugs/resolvedSlug", + "path": "/docs/slugs/hey/resolvedSlug", + "sidebar": undefined, + }, + { + "id": "slugs/tryToEscapeSlug", + "path": "/docs/tryToEscapeSlug", + "sidebar": undefined, + }, + { + "id": "unlisted-category/unlisted-category-doc", + "path": "/docs/unlisted-category/unlisted-category-doc", + "sidebar": "docs", + }, + { + "id": "unlisted-category/unlisted-category-index", + "path": "/docs/unlisted-category/", + "sidebar": "docs", + }, + { + "id": "/category/slugs", + "path": "/docs/category/slugs", + "sidebar": "docs", + }, + ], + "draftIds": [], + "isLast": true, + "label": "Next", + "mainDocId": "hello", + "name": "current", + "path": "/docs", + "sidebars": { + "docs": { + "link": { + "label": "foo/bar", + "path": "/docs/foo/bar", + }, + }, + }, + }, + ], + }, + }, +} +`; + +exports[`simple website content: route config 1`] = ` +[ + { + "component": "@theme/DocsRoot", + "exact": false, + "path": "/docs", + "routes": [ + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/docs", + "priority": -1, + "props": { + "version": { + "badge": false, + "banner": null, + "className": "docs-version-current", + "docs": { + "customLastUpdate": { + "description": "Custom last update", + "id": "customLastUpdate", + "sidebar": undefined, + "title": "Custom Last Update", + }, + "doc with space": { + "description": "", + "id": "doc with space", + "sidebar": undefined, + "title": "Hoo hoo, if this path tricks you...", + }, + "doc-draft": { + "description": "This is a draft document", + "id": "doc-draft", + "sidebar": undefined, + "title": "doc-draft", + }, + "doc-unlisted": { + "description": "This is an unlisted document", + "id": "doc-unlisted", + "sidebar": "docs", + "title": "doc-unlisted", + }, + "foo/bar": { + "description": "This is custom description", + "id": "foo/bar", + "sidebar": "docs", + "title": "Bar", + }, + "foo/baz": { + "description": "Images", + "id": "foo/baz", + "sidebar": "docs", + "title": "baz", + }, + "headingAsTitle": { + "description": "", + "id": "headingAsTitle", + "sidebar": "docs", + "title": "My heading as title", + }, + "hello": { + "description": "Hi, Endilie here :)", + "id": "hello", + "sidebar": "docs", + "title": "Hello, World !", + }, + "ipsum": { + "description": "Lorem ipsum.", + "id": "ipsum", + "sidebar": undefined, + "title": "ipsum", + }, + "lastUpdateAuthorOnly": { + "description": "Only custom author, so it will still use the date from Git", + "id": "lastUpdateAuthorOnly", + "sidebar": undefined, + "title": "Last Update Author Only", + }, + "lastUpdateDateOnly": { + "description": "Only custom date, so it will still use the author from Git", + "id": "lastUpdateDateOnly", + "sidebar": undefined, + "title": "Last Update Date Only", + }, + "lorem": { + "description": "Lorem ipsum.", + "id": "lorem", + "sidebar": undefined, + "title": "lorem", + }, + "rootAbsoluteSlug": { + "description": "Lorem", + "id": "rootAbsoluteSlug", + "sidebar": "docs", + "title": "rootAbsoluteSlug", + }, + "rootRelativeSlug": { + "description": "Lorem", + "id": "rootRelativeSlug", + "sidebar": "docs", + "title": "rootRelativeSlug", + }, + "rootResolvedSlug": { + "description": "Lorem", + "id": "rootResolvedSlug", + "sidebar": "docs", + "title": "rootResolvedSlug", + }, + "rootTryToEscapeSlug": { + "description": "Lorem", + "id": "rootTryToEscapeSlug", + "sidebar": "docs", + "title": "rootTryToEscapeSlug", + }, + "slugs/absoluteSlug": { + "description": "Lorem", + "id": "slugs/absoluteSlug", + "sidebar": undefined, + "title": "absoluteSlug", + }, + "slugs/relativeSlug": { + "description": "Lorem", + "id": "slugs/relativeSlug", + "sidebar": undefined, + "title": "relativeSlug", + }, + "slugs/resolvedSlug": { + "description": "Lorem", + "id": "slugs/resolvedSlug", + "sidebar": undefined, + "title": "resolvedSlug", + }, + "slugs/tryToEscapeSlug": { + "description": "Lorem", + "id": "slugs/tryToEscapeSlug", + "sidebar": undefined, + "title": "tryToEscapeSlug", + }, + "unlisted-category/unlisted-category-doc": { + "description": "This is an unlisted category doc", + "id": "unlisted-category/unlisted-category-doc", + "sidebar": "docs", + "title": "unlisted-category-doc", + }, + "unlisted-category/unlisted-category-index": { + "description": "This is an unlisted category index", + "id": "unlisted-category/unlisted-category-index", + "sidebar": "docs", + "title": "unlisted-category-index", + }, + }, + "docsSidebars": { + "docs": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "foo/bar", + "href": "/docs/foo/bar", + "label": "Bar", + "type": "link", + "unlisted": false, + }, + { + "className": undefined, + "customProps": undefined, + "docId": "doc-unlisted", + "href": "/docs/doc-unlisted", + "label": "doc-unlisted", + "type": "link", + "unlisted": false, + }, + { + "className": undefined, + "customProps": undefined, + "docId": "foo/baz", + "href": "/docs/foo/bazSlug.html", + "label": "baz", + "type": "link", + "unlisted": false, + }, + ], + "label": "foo", + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "href": "/docs/unlisted-category/", + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "unlisted-category/unlisted-category-doc", + "href": "/docs/unlisted-category/unlisted-category-doc", + "label": "unlisted-category-doc", + "type": "link", + "unlisted": false, + }, + ], + "label": "Unlisted category", + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "href": "/docs/category/slugs", + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "rootAbsoluteSlug", + "href": "/docs/rootAbsoluteSlug", + "label": "rootAbsoluteSlug", + "type": "link", + "unlisted": false, + }, + { + "className": undefined, + "customProps": undefined, + "docId": "rootRelativeSlug", + "href": "/docs/rootRelativeSlug", + "label": "rootRelativeSlug", + "type": "link", + "unlisted": false, + }, + { + "className": undefined, + "customProps": undefined, + "docId": "rootResolvedSlug", + "href": "/docs/hey/rootResolvedSlug", + "label": "rootResolvedSlug", + "type": "link", + "unlisted": false, + }, + { + "className": undefined, + "customProps": undefined, + "docId": "rootTryToEscapeSlug", + "href": "/docs/rootTryToEscapeSlug", + "label": "rootTryToEscapeSlug", + "type": "link", + "unlisted": false, + }, + ], + "label": "Slugs", + "type": "category", + }, + { + "className": undefined, + "customProps": undefined, + "docId": "headingAsTitle", + "href": "/docs/headingAsTitle", + "label": "My heading as title", + "type": "link", + "unlisted": false, + }, + { + "href": "https://github.com", + "label": "GitHub", + "type": "link", + }, + { + "className": undefined, + "customProps": undefined, + "docId": "hello", + "href": "/docs/", + "label": "Hello sidebar_label", + "type": "link", + "unlisted": false, + }, + ], + "label": "Test", + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "hello", + "href": "/docs/", + "label": "Hello sidebar_label", + "type": "link", + "unlisted": false, + }, + ], + "label": "Guides", + "type": "category", + }, + ], + }, + "isLast": true, + "label": "Next", + "noIndex": false, + "pluginId": "default", + "version": "current", + }, + }, + "routes": [ + { + "component": "@theme/DocTagsListPage", + "exact": true, + "path": "/docs/tags", + "props": { + "tags": [ + { + "count": 2, + "description": undefined, + "label": "tag 1", + "permalink": "/docs/tags/tag-1", + }, + { + "count": 1, + "description": "Global Tag 1 description", + "label": "Global Tag 1 label", + "permalink": "/docs/tags/global-tag-1-permalink", + }, + { + "count": 1, + "description": undefined, + "label": "tag 2", + "permalink": "/docs/tags/tag2-custom-permalink", + }, + { + "count": 1, + "description": undefined, + "label": "tag 3", + "permalink": "/docs/tags/tag-3", + }, + ], + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/tags/global-tag-1-permalink", + "props": { + "tag": { + "allTagsPath": "/docs/tags", + "count": 1, + "description": "Global Tag 1 description", + "items": [ + { + "description": "Images", + "id": "foo/baz", + "permalink": "/docs/foo/bazSlug.html", + "title": "baz", + }, + ], + "label": "Global Tag 1 label", + "permalink": "/docs/tags/global-tag-1-permalink", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/tags/tag-1", + "props": { + "tag": { + "allTagsPath": "/docs/tags", + "count": 2, + "description": undefined, + "items": [ + { + "description": "Images", + "id": "foo/baz", + "permalink": "/docs/foo/bazSlug.html", + "title": "baz", + }, + { + "description": "Hi, Endilie here :)", + "id": "hello", + "permalink": "/docs/", + "title": "Hello, World !", + }, + ], + "label": "tag 1", + "permalink": "/docs/tags/tag-1", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/tags/tag-3", + "props": { + "tag": { + "allTagsPath": "/docs/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "Hi, Endilie here :)", + "id": "hello", + "permalink": "/docs/", + "title": "Hello, World !", + }, + ], + "label": "tag 3", + "permalink": "/docs/tags/tag-3", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/tags/tag2-custom-permalink", + "props": { + "tag": { + "allTagsPath": "/docs/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "Images", + "id": "foo/baz", + "permalink": "/docs/foo/bazSlug.html", + "title": "baz", + }, + ], + "label": "tag 2", + "permalink": "/docs/tags/tag2-custom-permalink", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/docs", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/hello.md", + }, + "modules": { + "content": "@site/docs/hello.md", + }, + "path": "/docs/", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/absoluteSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/absoluteSlug.md", + }, + "path": "/docs/absoluteSlug", + }, + { + "component": "@theme/DocCategoryGeneratedIndexPage", + "exact": true, + "path": "/docs/category/slugs", + "props": { + "categoryGeneratedIndex": { + "description": undefined, + "image": undefined, + "keywords": undefined, + "navigation": { + "next": { + "permalink": "/docs/rootAbsoluteSlug", + "title": "rootAbsoluteSlug", + }, + "previous": { + "permalink": "/docs/unlisted-category/unlisted-category-doc", + "title": "unlisted-category-doc", + }, + }, + "permalink": "/docs/category/slugs", + "sidebar": "docs", + "slug": "/category/slugs", + "title": "Slugs", + }, + }, + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/customLastUpdate.md", + }, + "modules": { + "content": "@site/docs/customLastUpdate.md", + }, + "path": "/docs/customLastUpdate", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/doc with space.md", + }, + "modules": { + "content": "@site/docs/doc with space.md", + }, + "path": "/docs/doc with space", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/doc-draft.md", + }, + "modules": { + "content": "@site/docs/doc-draft.md", + }, + "path": "/docs/doc-draft", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/doc-unlisted.md", + }, + "modules": { + "content": "@site/docs/doc-unlisted.md", + }, + "path": "/docs/doc-unlisted", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/foo/bar.md", + }, + "modules": { + "content": "@site/docs/foo/bar.md", + }, + "path": "/docs/foo/bar", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/foo/baz.md", + }, + "modules": { + "content": "@site/docs/foo/baz.md", + }, + "path": "/docs/foo/bazSlug.html", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/headingAsTitle.md", + }, + "modules": { + "content": "@site/docs/headingAsTitle.md", + }, + "path": "/docs/headingAsTitle", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/rootResolvedSlug.md", + }, + "modules": { + "content": "@site/docs/rootResolvedSlug.md", + }, + "path": "/docs/hey/rootResolvedSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/ipsum.md", + }, + "modules": { + "content": "@site/docs/ipsum.md", + }, + "path": "/docs/ipsum", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/lastUpdateAuthorOnly.md", + }, + "modules": { + "content": "@site/docs/lastUpdateAuthorOnly.md", + }, + "path": "/docs/lastUpdateAuthorOnly", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/lastUpdateDateOnly.md", + }, + "modules": { + "content": "@site/docs/lastUpdateDateOnly.md", + }, + "path": "/docs/lastUpdateDateOnly", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/lorem.md", + }, + "modules": { + "content": "@site/docs/lorem.md", + }, + "path": "/docs/lorem", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/rootAbsoluteSlug.md", + }, + "modules": { + "content": "@site/docs/rootAbsoluteSlug.md", + }, + "path": "/docs/rootAbsoluteSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/rootRelativeSlug.md", + }, + "modules": { + "content": "@site/docs/rootRelativeSlug.md", + }, + "path": "/docs/rootRelativeSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/rootTryToEscapeSlug.md", + }, + "modules": { + "content": "@site/docs/rootTryToEscapeSlug.md", + }, + "path": "/docs/rootTryToEscapeSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/resolvedSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/resolvedSlug.md", + }, + "path": "/docs/slugs/hey/resolvedSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/relativeSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/relativeSlug.md", + }, + "path": "/docs/slugs/relativeSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/tryToEscapeSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/tryToEscapeSlug.md", + }, + "path": "/docs/tryToEscapeSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/unlisted-category/index.md", + }, + "modules": { + "content": "@site/docs/unlisted-category/index.md", + }, + "path": "/docs/unlisted-category/", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/unlisted-category/unlisted-category-doc.md", + }, + "modules": { + "content": "@site/docs/unlisted-category/unlisted-category-doc.md", + }, + "path": "/docs/unlisted-category/unlisted-category-doc", + "sidebar": "docs", + }, + ], + }, + ], + }, + ], + }, +] +`; + +exports[`site with custom sidebar items generator sidebar is autogenerated according to a custom sidebarItemsGenerator 1`] = ` +{ + "defaultSidebar": [ + { + "id": "API/api-overview", + "type": "doc", + }, + { + "id": "API/api-end", + "type": "doc", + }, + ], +} +`; + +exports[`site with custom sidebar items generator sidebarItemsGenerator can wrap/enhance/sort/reverse the default sidebar generator 1`] = ` +{ + "defaultSidebar": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/api-end", + "type": "doc", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Extension APIs/Theme API", + "type": "doc", + }, + { + "id": "API/Extension APIs/Plugin API", + "type": "doc", + }, + ], + "label": "Extension APIs (label from _category_.yml)", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Core APIs/Server API", + "type": "doc", + }, + { + "id": "API/Core APIs/Client API", + "type": "doc", + }, + ], + "label": "Core APIs", + "link": undefined, + "type": "category", + }, + { + "id": "API/api-overview", + "type": "doc", + }, + ], + "label": "API (label from _category_.json)", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "Guides/guide5", + "type": "doc", + }, + { + "id": "Guides/guide4", + "type": "doc", + }, + { + "id": "Guides/guide3", + "type": "doc", + }, + { + "id": "Guides/guide2.5", + "type": "doc", + }, + { + "id": "Guides/guide2", + "type": "doc", + }, + { + "id": "Guides/guide1", + "type": "doc", + }, + ], + "label": "Guides", + "link": undefined, + "type": "category", + }, + { + "id": "installation", + "type": "doc", + }, + { + "id": "getting-started", + "type": "doc", + }, + ], +} +`; + +exports[`site with custom sidebar items generator sidebarItemsGenerator is called with appropriate data 1`] = ` +{ + "categoriesMetadata": { + "3-API": { + "label": "API (label from _category_.json)", + }, + "3-API/02_Extension APIs": { + "label": "Extension APIs (label from _category_.yml)", + }, + "Guides": { + "position": 2, + }, + }, + "defaultSidebarItemsGenerator": [Function], + "docs": [ + { + "frontMatter": {}, + "id": "API/Core APIs/Client API", + "sidebarPosition": 0, + "source": "@site/docs/3-API/01_Core APIs/0 --- Client API.md", + "sourceDirName": "3-API/01_Core APIs", + "title": "Client API", + }, + { + "frontMatter": {}, + "id": "API/Core APIs/Server API", + "sidebarPosition": 1, + "source": "@site/docs/3-API/01_Core APIs/1 --- Server API.md", + "sourceDirName": "3-API/01_Core APIs", + "title": "Server API", + }, + { + "frontMatter": {}, + "id": "API/Extension APIs/Plugin API", + "sidebarPosition": 0, + "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", + "sourceDirName": "3-API/02_Extension APIs", + "title": "Plugin API", + }, + { + "frontMatter": {}, + "id": "API/Extension APIs/Theme API", + "sidebarPosition": 1, + "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", + "sourceDirName": "3-API/02_Extension APIs", + "title": "Theme API", + }, + { + "frontMatter": {}, + "id": "API/api-end", + "sidebarPosition": 3, + "source": "@site/docs/3-API/03_api-end.md", + "sourceDirName": "3-API", + "title": "API End", + }, + { + "frontMatter": {}, + "id": "API/api-overview", + "sidebarPosition": 0, + "source": "@site/docs/3-API/00_api-overview.md", + "sourceDirName": "3-API", + "title": "API Overview", + }, + { + "frontMatter": { + "id": "guide1", + "sidebar_position": 1, + }, + "id": "Guides/guide1", + "sidebarPosition": 1, + "source": "@site/docs/Guides/z-guide1.md", + "sourceDirName": "Guides", + "title": "Guide 1", + }, + { + "frontMatter": { + "id": "guide2", + }, + "id": "Guides/guide2", + "sidebarPosition": 2, + "source": "@site/docs/Guides/02-guide2.md", + "sourceDirName": "Guides", + "title": "Guide 2", + }, + { + "frontMatter": { + "id": "guide2.5", + "sidebar_position": 2.5, + }, + "id": "Guides/guide2.5", + "sidebarPosition": 2.5, + "source": "@site/docs/Guides/0-guide2.5.md", + "sourceDirName": "Guides", + "title": "Guide 2.5", + }, + { + "frontMatter": { + "id": "guide3", + "sidebar_position": 3, + }, + "id": "Guides/guide3", + "sidebarPosition": 3, + "source": "@site/docs/Guides/guide3.md", + "sourceDirName": "Guides", + "title": "Guide 3", + }, + { + "frontMatter": { + "id": "guide4", + }, + "id": "Guides/guide4", + "sidebarPosition": undefined, + "source": "@site/docs/Guides/a-guide4.md", + "sourceDirName": "Guides", + "title": "Guide 4", + }, + { + "frontMatter": { + "id": "guide5", + }, + "id": "Guides/guide5", + "sidebarPosition": undefined, + "source": "@site/docs/Guides/b-guide5.md", + "sourceDirName": "Guides", + "title": "Guide 5", + }, + { + "frontMatter": {}, + "id": "getting-started", + "sidebarPosition": 0, + "source": "@site/docs/0-getting-started.md", + "sourceDirName": ".", + "title": "Getting Started", + }, + { + "frontMatter": {}, + "id": "installation", + "sidebarPosition": 1, + "source": "@site/docs/1-installation.md", + "sourceDirName": ".", + "title": "Installation", + }, + ], + "isCategoryIndex": [Function], + "item": { + "dirName": ".", + "type": "autogenerated", + }, + "numberPrefixParser": [Function], + "version": { + "contentPath": "docs", + "versionName": "current", + }, +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 1`] = ` +{ + "description": "Getting started text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "getting-started", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/installation", + "title": "Installation", + }, + "permalink": "/docs/getting-started", + "previous": undefined, + "sidebar": "defaultSidebar", + "sidebarPosition": 0, + "slug": "/getting-started", + "source": "@site/docs/0-getting-started.md", + "sourceDirName": ".", + "tags": [], + "title": "Getting Started", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 2`] = ` +{ + "description": "Installation text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "installation", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide1", + "title": "Guide 1", + }, + "permalink": "/docs/installation", + "previous": { + "permalink": "/docs/getting-started", + "title": "Getting Started", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 1, + "slug": "/installation", + "source": "@site/docs/1-installation.md", + "sourceDirName": ".", + "tags": [], + "title": "Installation", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 3`] = ` +{ + "description": "Guide 1 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide1", + "sidebar_position": 1, + }, + "id": "Guides/guide1", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide2", + "title": "Guide 2", + }, + "permalink": "/docs/Guides/guide1", + "previous": { + "permalink": "/docs/installation", + "title": "Installation", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 1, + "slug": "/Guides/guide1", + "source": "@site/docs/Guides/z-guide1.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 1", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 4`] = ` +{ + "description": "Guide 2 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide2", + }, + "id": "Guides/guide2", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide2.5", + "title": "Guide 2.5", + }, + "permalink": "/docs/Guides/guide2", + "previous": { + "permalink": "/docs/Guides/guide1", + "title": "Guide 1", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 2, + "slug": "/Guides/guide2", + "source": "@site/docs/Guides/02-guide2.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 2", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 5`] = ` +{ + "description": "Guide 2.5 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide2.5", + "sidebar_position": 2.5, + }, + "id": "Guides/guide2.5", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide3", + "title": "Guide 3", + }, + "permalink": "/docs/Guides/guide2.5", + "previous": { + "permalink": "/docs/Guides/guide2", + "title": "Guide 2", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 2.5, + "slug": "/Guides/guide2.5", + "source": "@site/docs/Guides/0-guide2.5.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 2.5", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 6`] = ` +{ + "description": "Guide 3 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide3", + "sidebar_position": 3, + }, + "id": "Guides/guide3", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide4", + "title": "Guide 4", + }, + "permalink": "/docs/Guides/guide3", + "previous": { + "permalink": "/docs/Guides/guide2.5", + "title": "Guide 2.5", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 3, + "slug": "/Guides/guide3", + "source": "@site/docs/Guides/guide3.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 3", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 7`] = ` +{ + "description": "Guide 4 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide4", + }, + "id": "Guides/guide4", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/Guides/guide5", + "title": "Guide 5", + }, + "permalink": "/docs/Guides/guide4", + "previous": { + "permalink": "/docs/Guides/guide3", + "title": "Guide 3", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": undefined, + "slug": "/Guides/guide4", + "source": "@site/docs/Guides/a-guide4.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 4", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 8`] = ` +{ + "description": "Guide 5 text", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "id": "guide5", + }, + "id": "Guides/guide5", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/api-overview", + "title": "API Overview", + }, + "permalink": "/docs/Guides/guide5", + "previous": { + "permalink": "/docs/Guides/guide4", + "title": "Guide 4", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": undefined, + "slug": "/Guides/guide5", + "source": "@site/docs/Guides/b-guide5.md", + "sourceDirName": "Guides", + "tags": [], + "title": "Guide 5", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 9`] = ` +{ + "description": "API Overview text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/api-overview", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/Core APIs/Client API", + "title": "Client API", + }, + "permalink": "/docs/API/api-overview", + "previous": { + "permalink": "/docs/Guides/guide5", + "title": "Guide 5", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 0, + "slug": "/API/api-overview", + "source": "@site/docs/3-API/00_api-overview.md", + "sourceDirName": "3-API", + "tags": [], + "title": "API Overview", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 10`] = ` +{ + "description": "Client API text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/Core APIs/Client API", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/Core APIs/Server API", + "title": "Server API", + }, + "permalink": "/docs/API/Core APIs/Client API", + "previous": { + "permalink": "/docs/API/api-overview", + "title": "API Overview", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 0, + "slug": "/API/Core APIs/Client API", + "source": "@site/docs/3-API/01_Core APIs/0 --- Client API.md", + "sourceDirName": "3-API/01_Core APIs", + "tags": [], + "title": "Client API", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 11`] = ` +{ + "description": "Server API text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/Core APIs/Server API", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/Extension APIs/Plugin API", + "title": "Plugin API", + }, + "permalink": "/docs/API/Core APIs/Server API", + "previous": { + "permalink": "/docs/API/Core APIs/Client API", + "title": "Client API", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 1, + "slug": "/API/Core APIs/Server API", + "source": "@site/docs/3-API/01_Core APIs/1 --- Server API.md", + "sourceDirName": "3-API/01_Core APIs", + "tags": [], + "title": "Server API", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 12`] = ` +{ + "description": "Plugin API text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/Extension APIs/Plugin API", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/Extension APIs/Theme API", + "title": "Theme API", + }, + "permalink": "/docs/API/Extension APIs/Plugin API", + "previous": { + "permalink": "/docs/API/Core APIs/Server API", + "title": "Server API", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 0, + "slug": "/API/Extension APIs/Plugin API", + "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", + "sourceDirName": "3-API/02_Extension APIs", + "tags": [], + "title": "Plugin API", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 13`] = ` +{ + "description": "Theme API text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/Extension APIs/Theme API", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/api-end", + "title": "API End", + }, + "permalink": "/docs/API/Extension APIs/Theme API", + "previous": { + "permalink": "/docs/API/Extension APIs/Plugin API", + "title": "Plugin API", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 1, + "slug": "/API/Extension APIs/Theme API", + "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", + "sourceDirName": "3-API/02_Extension APIs", + "tags": [], + "title": "Theme API", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 14`] = ` +{ + "description": "API End text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/api-end", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/API/api-end", + "previous": { + "permalink": "/docs/API/Extension APIs/Theme API", + "title": "Theme API", + }, + "sidebar": "defaultSidebar", + "sidebarPosition": 3, + "slug": "/API/api-end", + "source": "@site/docs/3-API/03_api-end.md", + "sourceDirName": "3-API", + "tags": [], + "title": "API End", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with full autogenerated sidebar sidebar is fully autogenerated 1`] = ` +{ + "defaultSidebar": [ + { + "id": "getting-started", + "type": "doc", + }, + { + "id": "installation", + "type": "doc", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "Guides/guide1", + "type": "doc", + }, + { + "id": "Guides/guide2", + "type": "doc", + }, + { + "id": "Guides/guide2.5", + "type": "doc", + }, + { + "id": "Guides/guide3", + "type": "doc", + }, + { + "id": "Guides/guide4", + "type": "doc", + }, + { + "id": "Guides/guide5", + "type": "doc", + }, + ], + "label": "Guides", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/api-overview", + "type": "doc", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Core APIs/Client API", + "type": "doc", + }, + { + "id": "API/Core APIs/Server API", + "type": "doc", + }, + ], + "label": "Core APIs", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Extension APIs/Plugin API", + "type": "doc", + }, + { + "id": "API/Extension APIs/Theme API", + "type": "doc", + }, + ], + "label": "Extension APIs (label from _category_.yml)", + "link": undefined, + "type": "category", + }, + { + "id": "API/api-end", + "type": "doc", + }, + ], + "label": "API (label from _category_.json)", + "link": undefined, + "type": "category", + }, + ], +} +`; + +exports[`site with partial autogenerated sidebars 2 (fix #4638) sidebar is partially autogenerated 1`] = ` +{ + "someSidebar": [ + { + "id": "API/api-end", + "type": "doc", + }, + { + "id": "API/api-overview", + "type": "doc", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Core APIs/Client API", + "type": "doc", + }, + { + "id": "API/Core APIs/Server API", + "type": "doc", + }, + ], + "label": "Core APIs", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/Extension APIs/Plugin API", + "type": "doc", + }, + { + "id": "API/Extension APIs/Theme API", + "type": "doc", + }, + ], + "label": "Extension APIs (label from _category_.yml)", + "link": undefined, + "type": "category", + }, + { + "id": "API/api-end", + "type": "doc", + }, + ], +} +`; + +exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 1`] = ` +{ + "description": "API End text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/api-end", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/api-overview", + "title": "API Overview", + }, + "permalink": "/docs/API/api-end", + "previous": undefined, + "sidebar": "someSidebar", + "sidebarPosition": 3, + "slug": "/API/api-end", + "source": "@site/docs/3-API/03_api-end.md", + "sourceDirName": "3-API", + "tags": [], + "title": "API End", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 2`] = ` +{ + "description": "API Overview text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/api-overview", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/Extension APIs/Plugin API", + "title": "Plugin API", + }, + "permalink": "/docs/API/api-overview", + "previous": { + "permalink": "/docs/API/api-end", + "title": "API End", + }, + "sidebar": "someSidebar", + "sidebarPosition": 0, + "slug": "/API/api-overview", + "source": "@site/docs/3-API/00_api-overview.md", + "sourceDirName": "3-API", + "tags": [], + "title": "API Overview", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 3`] = ` +{ + "description": "Plugin API text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/Extension APIs/Plugin API", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/API/Extension APIs/Theme API", + "title": "Theme API", + }, + "permalink": "/docs/API/Extension APIs/Plugin API", + "previous": { + "permalink": "/docs/API/api-overview", + "title": "API Overview", + }, + "sidebar": "someSidebar", + "sidebarPosition": 0, + "slug": "/API/Extension APIs/Plugin API", + "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", + "sourceDirName": "3-API/02_Extension APIs", + "tags": [], + "title": "Plugin API", + "unlisted": false, + "version": "current", +} +`; + +exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 4`] = ` +{ + "description": "Theme API text", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "API/Extension APIs/Theme API", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/API/Extension APIs/Theme API", + "previous": { + "permalink": "/docs/API/Extension APIs/Plugin API", + "title": "Plugin API", + }, + "sidebar": "someSidebar", + "sidebarPosition": 1, + "slug": "/API/Extension APIs/Theme API", + "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", + "sourceDirName": "3-API/02_Extension APIs", + "tags": [], + "title": "Theme API", + "unlisted": false, + "version": "current", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 8`] = ` +exports[`site with partial autogenerated sidebars sidebar is partially autogenerated 1`] = ` { - "description": "Guide 5 text", + "someSidebar": [ + { + "id": "API/api-end", + "type": "doc", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "API/api-overview", + "type": "doc", + }, + { + "id": "API/Extension APIs/Plugin API", + "type": "doc", + }, + { + "id": "API/Extension APIs/Theme API", + "type": "doc", + }, + ], + "label": "Some category", + "link": undefined, + "type": "category", + }, + ], +} +`; + +exports[`versioned website (community) content 1`] = ` +{ + "description": "Team current version (translated)", "draft": false, "editUrl": undefined, "frontMatter": { - "id": "guide5", + "title": "Team title translated", }, - "id": "Guides/guide5", + "id": "team", "lastUpdatedAt": undefined, "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/api-overview", - "title": "API Overview", - }, - "permalink": "/docs/Guides/guide5", - "previous": { - "permalink": "/docs/Guides/guide4", - "title": "Guide 4", - }, - "sidebar": "defaultSidebar", + "next": undefined, + "permalink": "/community/next/team", + "previous": undefined, + "sidebar": "community", "sidebarPosition": undefined, - "slug": "/Guides/guide5", - "source": "@site/docs/Guides/b-guide5.md", - "sourceDirName": "Guides", + "slug": "/team", + "source": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", + "sourceDirName": ".", "tags": [], - "title": "Guide 5", + "title": "Team title translated", "unlisted": false, "version": "current", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 9`] = ` +exports[`versioned website (community) content 2`] = ` { - "description": "API Overview text", + "description": "Team 1.0.0", "draft": false, "editUrl": undefined, "frontMatter": {}, - "id": "API/api-overview", + "id": "team", "lastUpdatedAt": undefined, "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/Core APIs/Client API", - "title": "Client API", + "next": undefined, + "permalink": "/community/team", + "previous": undefined, + "sidebar": "community", + "sidebarPosition": undefined, + "slug": "/team", + "source": "@site/community_versioned_docs/version-1.0.0/team.md", + "sourceDirName": ".", + "tags": [], + "title": "team", + "unlisted": false, + "version": "1.0.0", +} +`; + +exports[`versioned website (community) content: 100 version sidebars 1`] = ` +{ + "community": [ + { + "id": "team", + "type": "doc", + }, + ], +} +`; + +exports[`versioned website (community) content: current version sidebars 1`] = ` +{ + "community": [ + { + "id": "team", + "type": "doc", + }, + ], +} +`; + +exports[`versioned website (community) content: data 1`] = ` +{ + "site-community-versioned-docs-version-1-0-0-team-md-359.json": { + "description": "Team 1.0.0", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "team", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/community/team", + "previous": undefined, + "sidebar": "community", + "sidebarPosition": undefined, + "slug": "/team", + "source": "@site/community_versioned_docs/version-1.0.0/team.md", + "sourceDirName": ".", + "tags": [], + "title": "team", + "unlisted": false, + "version": "1.0.0", }, - "permalink": "/docs/API/api-overview", - "previous": { - "permalink": "/docs/Guides/guide5", - "title": "Guide 5", + "site-i-18-n-en-docusaurus-plugin-content-docs-community-current-team-md-7e5.json": { + "description": "Team current version (translated)", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "title": "Team title translated", + }, + "id": "team", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/community/next/team", + "previous": undefined, + "sidebar": "community", + "sidebarPosition": undefined, + "slug": "/team", + "source": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", + "sourceDirName": ".", + "tags": [], + "title": "Team title translated", + "unlisted": false, + "version": "current", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 0, - "slug": "/API/api-overview", - "source": "@site/docs/3-API/00_api-overview.md", - "sourceDirName": "3-API", - "tags": [], - "title": "API Overview", +} +`; + +exports[`versioned website (community) content: global data 1`] = ` +{ + "pluginName": { + "pluginId": { + "breadcrumbs": true, + "path": "/community", + "versions": [ + { + "docs": [ + { + "id": "team", + "path": "/community/next/team", + "sidebar": "community", + }, + ], + "draftIds": [], + "isLast": false, + "label": "Next", + "mainDocId": "team", + "name": "current", + "path": "/community/next", + "sidebars": { + "community": { + "link": { + "label": "team", + "path": "/community/next/team", + }, + }, + }, + }, + { + "docs": [ + { + "id": "team", + "path": "/community/team", + "sidebar": "community", + }, + ], + "draftIds": [], + "isLast": true, + "label": "1.0.0", + "mainDocId": "team", + "name": "1.0.0", + "path": "/community", + "sidebars": { + "community": { + "link": { + "label": "team", + "path": "/community/team", + }, + }, + }, + }, + ], + }, + }, +} +`; + +exports[`versioned website (community) content: route config 1`] = ` +[ + { + "component": "@theme/DocsRoot", + "exact": false, + "path": "/community", + "routes": [ + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/community/next", + "priority": undefined, + "props": { + "version": { + "badge": true, + "banner": "unreleased", + "className": "docs-version-current", + "docs": { + "team": { + "description": "Team current version (translated)", + "id": "team", + "sidebar": "community", + "title": "Team title translated", + }, + }, + "docsSidebars": { + "community": [ + { + "className": undefined, + "customProps": undefined, + "docId": "team", + "href": "/community/next/team", + "label": "Team title translated", + "type": "link", + "unlisted": false, + }, + ], + }, + "isLast": false, + "label": "Next", + "noIndex": false, + "pluginId": "community", + "version": "current", + }, + }, + "routes": [ + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/community/next", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "i18n/en/docusaurus-plugin-content-docs-community/current/team.md", + }, + "modules": { + "content": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", + }, + "path": "/community/next/team", + "sidebar": "community", + }, + ], + }, + ], + }, + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/community", + "priority": -1, + "props": { + "version": { + "badge": true, + "banner": null, + "className": "docs-version-1.0.0", + "docs": { + "team": { + "description": "Team 1.0.0", + "id": "team", + "sidebar": "community", + "title": "team", + }, + }, + "docsSidebars": { + "community": [ + { + "className": undefined, + "customProps": undefined, + "docId": "team", + "href": "/community/team", + "label": "team", + "type": "link", + "unlisted": false, + }, + ], + }, + "isLast": true, + "label": "1.0.0", + "noIndex": false, + "pluginId": "community", + "version": "1.0.0", + }, + }, + "routes": [ + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/community", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "community_versioned_docs/version-1.0.0/team.md", + }, + "modules": { + "content": "@site/community_versioned_docs/version-1.0.0/team.md", + }, + "path": "/community/team", + "sidebar": "community", + }, + ], + }, + ], + }, + ], + }, +] +`; + +exports[`versioned website content 1`] = ` +{ + "description": "This is next version of bar.", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "barSlug", + "tags": [ + "barTag 1", + "barTag-2", + { + "label": "barTag 3", + "permalink": "barTag-3-permalink", + }, + ], + }, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/next/", + "title": "hello", + }, + "permalink": "/docs/next/foo/barSlug", + "previous": undefined, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/barSlug", + "source": "@site/docs/foo/bar.md", + "sourceDirName": "foo", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "barTag 1", + "permalink": "/docs/next/tags/bar-tag-1", + }, + { + "description": undefined, + "inline": true, + "label": "barTag-2", + "permalink": "/docs/next/tags/bar-tag-2", + }, + { + "description": undefined, + "inline": true, + "label": "barTag 3", + "permalink": "/docs/next/tags/barTag-3-permalink", + }, + ], + "title": "bar", "unlisted": false, "version": "current", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 10`] = ` +exports[`versioned website content 2`] = ` { - "description": "Client API text", + "description": "Bar 1.0.1 !", "draft": false, "editUrl": undefined, "frontMatter": {}, - "id": "API/Core APIs/Client API", + "id": "foo/bar", "lastUpdatedAt": undefined, "lastUpdatedBy": undefined, "next": { - "permalink": "/docs/API/Core APIs/Server API", - "title": "Server API", - }, - "permalink": "/docs/API/Core APIs/Client API", - "previous": { - "permalink": "/docs/API/api-overview", - "title": "API Overview", + "permalink": "/docs/", + "title": "hello", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 0, - "slug": "/API/Core APIs/Client API", - "source": "@site/docs/3-API/01_Core APIs/0 --- Client API.md", - "sourceDirName": "3-API/01_Core APIs", + "permalink": "/docs/foo/bar", + "previous": undefined, + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "sidebarPosition": undefined, + "slug": "/foo/bar", + "source": "@site/versioned_docs/version-1.0.1/foo/bar.md", + "sourceDirName": "foo", "tags": [], - "title": "Client API", + "title": "bar", "unlisted": false, - "version": "current", + "version": "1.0.1", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 11`] = ` +exports[`versioned website content 3`] = ` { - "description": "Server API text", + "description": "Hello next !", "draft": false, "editUrl": undefined, - "frontMatter": {}, - "id": "API/Core APIs/Server API", + "frontMatter": { + "slug": "/", + }, + "id": "hello", "lastUpdatedAt": undefined, "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/Extension APIs/Plugin API", - "title": "Plugin API", - }, - "permalink": "/docs/API/Core APIs/Server API", + "next": undefined, + "permalink": "/docs/next/", "previous": { - "permalink": "/docs/API/Core APIs/Client API", - "title": "Client API", + "permalink": "/docs/next/foo/barSlug", + "title": "bar", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 1, - "slug": "/API/Core APIs/Server API", - "source": "@site/docs/3-API/01_Core APIs/1 --- Server API.md", - "sourceDirName": "3-API/01_Core APIs", + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/docs/hello.md", + "sourceDirName": ".", "tags": [], - "title": "Server API", + "title": "hello", "unlisted": false, "version": "current", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 12`] = ` +exports[`versioned website content 4`] = ` { - "description": "Plugin API text", + "description": "Hello 1.0.1 !", "draft": false, "editUrl": undefined, - "frontMatter": {}, - "id": "API/Extension APIs/Plugin API", + "frontMatter": { + "slug": "/", + "tags": [ + "inlineTag-v1.0.1", + "globalTag-v1.0.1", + ], + }, + "id": "hello", "lastUpdatedAt": undefined, "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/Extension APIs/Theme API", - "title": "Theme API", - }, - "permalink": "/docs/API/Extension APIs/Plugin API", + "next": undefined, + "permalink": "/docs/", "previous": { - "permalink": "/docs/API/Core APIs/Server API", - "title": "Server API", + "permalink": "/docs/foo/bar", + "title": "bar", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 0, - "slug": "/API/Extension APIs/Plugin API", - "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", - "sourceDirName": "3-API/02_Extension APIs", - "tags": [], - "title": "Plugin API", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/versioned_docs/version-1.0.1/hello.md", + "sourceDirName": ".", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "inlineTag-v1.0.1", + "permalink": "/docs/tags/inline-tag-v-1-0-1", + }, + { + "description": "globalTag-v1.0.1 description", + "inline": false, + "label": "globalTag-v1.0.1 label", + "permalink": "/docs/tags/globalTag-v1.0.1 permalink", + }, + ], + "title": "hello", "unlisted": false, - "version": "current", + "version": "1.0.1", } `; -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 13`] = ` +exports[`versioned website content 5`] = ` { - "description": "Theme API text", + "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", "draft": false, "editUrl": undefined, "frontMatter": {}, - "id": "API/Extension APIs/Theme API", + "id": "foo/baz", "lastUpdatedAt": undefined, "lastUpdatedBy": undefined, "next": { - "permalink": "/docs/API/api-end", - "title": "API End", - }, - "permalink": "/docs/API/Extension APIs/Theme API", - "previous": { - "permalink": "/docs/API/Extension APIs/Plugin API", - "title": "Plugin API", + "permalink": "/docs/1.0.0/", + "title": "hello", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 1, - "slug": "/API/Extension APIs/Theme API", - "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", - "sourceDirName": "3-API/02_Extension APIs", - "tags": [], - "title": "Theme API", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with full autogenerated sidebar docs in fully generated sidebar have correct metadata 14`] = ` -{ - "description": "API End text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "API/api-end", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/API/api-end", + "permalink": "/docs/1.0.0/foo/baz", "previous": { - "permalink": "/docs/API/Extension APIs/Theme API", - "title": "Theme API", + "permalink": "/docs/1.0.0/foo/barSlug", + "title": "bar", }, - "sidebar": "defaultSidebar", - "sidebarPosition": 3, - "slug": "/API/api-end", - "source": "@site/docs/3-API/03_api-end.md", - "sourceDirName": "3-API", + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/baz", + "source": "@site/versioned_docs/version-1.0.0/foo/baz.md", + "sourceDirName": "foo", "tags": [], - "title": "API End", + "title": "baz", "unlisted": false, - "version": "current", + "version": "1.0.0", } `; -exports[`site with full autogenerated sidebar sidebar is fully autogenerated 1`] = ` +exports[`versioned website content: 100 version sidebars 1`] = ` { - "defaultSidebar": [ - { - "id": "getting-started", - "type": "doc", - }, - { - "id": "installation", - "type": "doc", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "Guides/guide1", - "type": "doc", - }, - { - "id": "Guides/guide2", - "type": "doc", - }, - { - "id": "Guides/guide2.5", - "type": "doc", - }, - { - "id": "Guides/guide3", - "type": "doc", - }, - { - "id": "Guides/guide4", - "type": "doc", - }, - { - "id": "Guides/guide5", - "type": "doc", - }, - ], - "label": "Guides", - "link": undefined, - "type": "category", - }, + "docs": [ { "collapsed": true, "collapsible": true, "items": [ { - "id": "API/api-overview", - "type": "doc", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/Core APIs/Client API", - "type": "doc", - }, - { - "id": "API/Core APIs/Server API", - "type": "doc", - }, - ], - "label": "Core APIs", - "link": undefined, - "type": "category", - }, - { - "collapsed": true, - "collapsible": true, - "items": [ - { - "id": "API/Extension APIs/Plugin API", - "type": "doc", - }, - { - "id": "API/Extension APIs/Theme API", - "type": "doc", - }, - ], - "label": "Extension APIs (label from _category_.yml)", - "link": undefined, - "type": "category", + "id": "foo/bar", + "type": "doc", }, { - "id": "API/api-end", + "id": "foo/baz", "type": "doc", }, ], - "label": "API (label from _category_.json)", + "label": "Test", + "link": undefined, + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "hello", + "type": "doc", + }, + ], + "label": "Guides", "link": undefined, "type": "category", }, @@ -1251,31 +3541,52 @@ exports[`site with full autogenerated sidebar sidebar is fully autogenerated 1`] } `; -exports[`site with partial autogenerated sidebars 2 (fix #4638) sidebar is partially autogenerated 1`] = ` +exports[`versioned website content: 101 version sidebars 1`] = ` { - "someSidebar": [ - { - "id": "API/api-end", - "type": "doc", - }, + "VersionedSideBarNameDoesNotMatter/docs": [ { - "id": "API/api-overview", - "type": "doc", + "collapsed": true, + "collapsible": true, + "items": [ + { + "id": "foo/bar", + "type": "doc", + }, + ], + "label": "Test", + "link": undefined, + "type": "category", }, { "collapsed": true, "collapsible": true, "items": [ { - "id": "API/Core APIs/Client API", + "id": "hello", "type": "doc", }, + ], + "label": "Guides", + "link": undefined, + "type": "category", + }, + ], +} +`; + +exports[`versioned website content: current version sidebars 1`] = ` +{ + "docs": [ + { + "collapsed": true, + "collapsible": true, + "items": [ { - "id": "API/Core APIs/Server API", + "id": "foo/bar", "type": "doc", }, ], - "label": "Core APIs", + "label": "Test", "link": undefined, "type": "category", }, @@ -1284,406 +3595,1589 @@ exports[`site with partial autogenerated sidebars 2 (fix #4638) sidebar is parti "collapsible": true, "items": [ { - "id": "API/Extension APIs/Plugin API", + "id": "hello", "type": "doc", }, + ], + "label": "Guides", + "link": undefined, + "type": "category", + }, + ], +} +`; + +exports[`versioned website content: data 1`] = ` +{ + "site-docs-foo-bar-md-8c2.json": { + "description": "This is next version of bar.", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "barSlug", + "tags": [ + "barTag 1", + "barTag-2", { - "id": "API/Extension APIs/Theme API", - "type": "doc", + "label": "barTag 3", + "permalink": "barTag-3-permalink", + }, + ], + }, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/next/", + "title": "hello", + }, + "permalink": "/docs/next/foo/barSlug", + "previous": undefined, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/barSlug", + "source": "@site/docs/foo/bar.md", + "sourceDirName": "foo", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "barTag 1", + "permalink": "/docs/next/tags/bar-tag-1", + }, + { + "description": undefined, + "inline": true, + "label": "barTag-2", + "permalink": "/docs/next/tags/bar-tag-2", + }, + { + "description": undefined, + "inline": true, + "label": "barTag 3", + "permalink": "/docs/next/tags/barTag-3-permalink", + }, + ], + "title": "bar", + "unlisted": false, + "version": "current", + }, + "site-docs-hello-md-9df.json": { + "description": "Hello next !", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/", + }, + "id": "hello", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/next/", + "previous": { + "permalink": "/docs/next/foo/barSlug", + "title": "bar", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/docs/hello.md", + "sourceDirName": ".", + "tags": [], + "title": "hello", + "unlisted": false, + "version": "current", + }, + "site-docs-slugs-absolute-slug-md-4e8.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/absoluteSlug", + }, + "id": "slugs/absoluteSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/next/absoluteSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/absoluteSlug", + "source": "@site/docs/slugs/absoluteSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "absoluteSlug", + "unlisted": false, + "version": "current", + }, + "site-docs-slugs-relative-slug-md-d1c.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "relativeSlug", + }, + "id": "slugs/relativeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/next/slugs/relativeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/slugs/relativeSlug", + "source": "@site/docs/slugs/relativeSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "relativeSlug", + "unlisted": false, + "version": "current", + }, + "site-docs-slugs-resolved-slug-md-02b.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "./hey/ho/../resolvedSlug", + }, + "id": "slugs/resolvedSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/next/slugs/hey/resolvedSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/slugs/hey/resolvedSlug", + "source": "@site/docs/slugs/resolvedSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "resolvedSlug", + "unlisted": false, + "version": "current", + }, + "site-docs-slugs-try-to-escape-slug-md-70d.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "../../../../../../../../tryToEscapeSlug", + }, + "id": "slugs/tryToEscapeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/next/tryToEscapeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/tryToEscapeSlug", + "source": "@site/docs/slugs/tryToEscapeSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "tryToEscapeSlug", + "unlisted": false, + "version": "current", + }, + "site-i-18-n-en-docusaurus-plugin-content-docs-version-1-0-0-hello-md-fe5.json": { + "description": "Hello 1.0.0 ! (translated en)", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/", + "tags": [ + "inlineTag-v1.0.0", + "globalTag-v1.0.0", + ], + }, + "id": "hello", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/1.0.0/", + "previous": { + "permalink": "/docs/1.0.0/foo/baz", + "title": "baz", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/i18n/en/docusaurus-plugin-content-docs/version-1.0.0/hello.md", + "sourceDirName": ".", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "inlineTag-v1.0.0", + "permalink": "/docs/1.0.0/tags/inline-tag-v-1-0-0", + }, + { + "description": "globalTag-v1.0.0 description (en)", + "inline": false, + "label": "globalTag-v1.0.0 label (en)", + "permalink": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", + }, + ], + "title": "hello", + "unlisted": false, + "version": "1.0.0", + }, + "site-versioned-docs-version-1-0-0-foo-bar-md-7a6.json": { + "description": "Bar 1.0.0 !", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "barSlug", + }, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/1.0.0/foo/baz", + "title": "baz", + }, + "permalink": "/docs/1.0.0/foo/barSlug", + "previous": undefined, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/barSlug", + "source": "@site/versioned_docs/version-1.0.0/foo/bar.md", + "sourceDirName": "foo", + "tags": [], + "title": "bar", + "unlisted": false, + "version": "1.0.0", + }, + "site-versioned-docs-version-1-0-0-foo-baz-md-883.json": { + "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "foo/baz", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/1.0.0/", + "title": "hello", + }, + "permalink": "/docs/1.0.0/foo/baz", + "previous": { + "permalink": "/docs/1.0.0/foo/barSlug", + "title": "bar", + }, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/foo/baz", + "source": "@site/versioned_docs/version-1.0.0/foo/baz.md", + "sourceDirName": "foo", + "tags": [], + "title": "baz", + "unlisted": false, + "version": "1.0.0", + }, + "site-versioned-docs-version-1-0-1-foo-bar-md-7a3.json": { + "description": "Bar 1.0.1 !", + "draft": false, + "editUrl": undefined, + "frontMatter": {}, + "id": "foo/bar", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": { + "permalink": "/docs/", + "title": "hello", + }, + "permalink": "/docs/foo/bar", + "previous": undefined, + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "sidebarPosition": undefined, + "slug": "/foo/bar", + "source": "@site/versioned_docs/version-1.0.1/foo/bar.md", + "sourceDirName": "foo", + "tags": [], + "title": "bar", + "unlisted": false, + "version": "1.0.1", + }, + "site-versioned-docs-version-1-0-1-hello-md-0c7.json": { + "description": "Hello 1.0.1 !", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/", + "tags": [ + "inlineTag-v1.0.1", + "globalTag-v1.0.1", + ], + }, + "id": "hello", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/", + "previous": { + "permalink": "/docs/foo/bar", + "title": "bar", + }, + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "sidebarPosition": undefined, + "slug": "/", + "source": "@site/versioned_docs/version-1.0.1/hello.md", + "sourceDirName": ".", + "tags": [ + { + "description": undefined, + "inline": true, + "label": "inlineTag-v1.0.1", + "permalink": "/docs/tags/inline-tag-v-1-0-1", + }, + { + "description": "globalTag-v1.0.1 description", + "inline": false, + "label": "globalTag-v1.0.1 label", + "permalink": "/docs/tags/globalTag-v1.0.1 permalink", + }, + ], + "title": "hello", + "unlisted": false, + "version": "1.0.1", + }, + "site-versioned-docs-version-with-slugs-root-absolute-slug-md-4d2.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/rootAbsoluteSlug", + }, + "id": "rootAbsoluteSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/rootAbsoluteSlug", + "previous": undefined, + "sidebar": "docs", + "sidebarPosition": undefined, + "slug": "/rootAbsoluteSlug", + "source": "@site/versioned_docs/version-withSlugs/rootAbsoluteSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootAbsoluteSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-root-relative-slug-md-32a.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "rootRelativeSlug", + }, + "id": "rootRelativeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/rootRelativeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/rootRelativeSlug", + "source": "@site/versioned_docs/version-withSlugs/rootRelativeSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootRelativeSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-root-resolved-slug-md-aee.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "./hey/ho/../rootResolvedSlug", + }, + "id": "rootResolvedSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/hey/rootResolvedSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/hey/rootResolvedSlug", + "source": "@site/versioned_docs/version-withSlugs/rootResolvedSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootResolvedSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-root-try-to-escape-slug-md-b5d.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "../../../../../../../../rootTryToEscapeSlug", + }, + "id": "rootTryToEscapeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/rootTryToEscapeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/rootTryToEscapeSlug", + "source": "@site/versioned_docs/version-withSlugs/rootTryToEscapeSlug.md", + "sourceDirName": ".", + "tags": [], + "title": "rootTryToEscapeSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-slugs-absolute-slug-md-47a.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "/absoluteSlug", + }, + "id": "slugs/absoluteSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/absoluteSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/absoluteSlug", + "source": "@site/versioned_docs/version-withSlugs/slugs/absoluteSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "absoluteSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-slugs-relative-slug-md-a95.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "relativeSlug", + }, + "id": "slugs/relativeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/slugs/relativeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/slugs/relativeSlug", + "source": "@site/versioned_docs/version-withSlugs/slugs/relativeSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "relativeSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-slugs-resolved-slug-md-5a1.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "./hey/ho/../resolvedSlug", + }, + "id": "slugs/resolvedSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/slugs/hey/resolvedSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/slugs/hey/resolvedSlug", + "source": "@site/versioned_docs/version-withSlugs/slugs/resolvedSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "resolvedSlug", + "unlisted": false, + "version": "withSlugs", + }, + "site-versioned-docs-version-with-slugs-slugs-try-to-escape-slug-md-4e1.json": { + "description": "Lorem", + "draft": false, + "editUrl": undefined, + "frontMatter": { + "slug": "../../../../../../../../tryToEscapeSlug", + }, + "id": "slugs/tryToEscapeSlug", + "lastUpdatedAt": undefined, + "lastUpdatedBy": undefined, + "next": undefined, + "permalink": "/docs/withSlugs/tryToEscapeSlug", + "previous": undefined, + "sidebar": undefined, + "sidebarPosition": undefined, + "slug": "/tryToEscapeSlug", + "source": "@site/versioned_docs/version-withSlugs/slugs/tryToEscapeSlug.md", + "sourceDirName": "slugs", + "tags": [], + "title": "tryToEscapeSlug", + "unlisted": false, + "version": "withSlugs", + }, +} +`; + +exports[`versioned website content: global data 1`] = ` +{ + "pluginName": { + "pluginId": { + "breadcrumbs": true, + "path": "/docs", + "versions": [ + { + "docs": [ + { + "id": "foo/bar", + "path": "/docs/next/foo/barSlug", + "sidebar": "docs", + }, + { + "id": "hello", + "path": "/docs/next/", + "sidebar": "docs", + }, + { + "id": "slugs/absoluteSlug", + "path": "/docs/next/absoluteSlug", + "sidebar": undefined, + }, + { + "id": "slugs/relativeSlug", + "path": "/docs/next/slugs/relativeSlug", + "sidebar": undefined, + }, + { + "id": "slugs/resolvedSlug", + "path": "/docs/next/slugs/hey/resolvedSlug", + "sidebar": undefined, + }, + { + "id": "slugs/tryToEscapeSlug", + "path": "/docs/next/tryToEscapeSlug", + "sidebar": undefined, + }, + ], + "draftIds": [], + "isLast": false, + "label": "Next", + "mainDocId": "hello", + "name": "current", + "path": "/docs/next", + "sidebars": { + "docs": { + "link": { + "label": "foo/bar", + "path": "/docs/next/foo/barSlug", + }, + }, + }, + }, + { + "docs": [ + { + "id": "foo/bar", + "path": "/docs/foo/bar", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + }, + { + "id": "hello", + "path": "/docs/", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + }, + ], + "draftIds": [], + "isLast": true, + "label": "1.0.1", + "mainDocId": "hello", + "name": "1.0.1", + "path": "/docs", + "sidebars": { + "VersionedSideBarNameDoesNotMatter/docs": { + "link": { + "label": "foo/bar", + "path": "/docs/foo/bar", + }, + }, + }, + }, + { + "docs": [ + { + "id": "foo/bar", + "path": "/docs/1.0.0/foo/barSlug", + "sidebar": "docs", + }, + { + "id": "foo/baz", + "path": "/docs/1.0.0/foo/baz", + "sidebar": "docs", + }, + { + "id": "hello", + "path": "/docs/1.0.0/", + "sidebar": "docs", + }, + ], + "draftIds": [], + "isLast": false, + "label": "1.0.0", + "mainDocId": "hello", + "name": "1.0.0", + "path": "/docs/1.0.0", + "sidebars": { + "docs": { + "link": { + "label": "foo/bar", + "path": "/docs/1.0.0/foo/barSlug", + }, + }, + }, + }, + { + "docs": [ + { + "id": "rootAbsoluteSlug", + "path": "/docs/withSlugs/rootAbsoluteSlug", + "sidebar": "docs", + }, + { + "id": "rootRelativeSlug", + "path": "/docs/withSlugs/rootRelativeSlug", + "sidebar": undefined, + }, + { + "id": "rootResolvedSlug", + "path": "/docs/withSlugs/hey/rootResolvedSlug", + "sidebar": undefined, + }, + { + "id": "rootTryToEscapeSlug", + "path": "/docs/withSlugs/rootTryToEscapeSlug", + "sidebar": undefined, + }, + { + "id": "slugs/absoluteSlug", + "path": "/docs/withSlugs/absoluteSlug", + "sidebar": undefined, + }, + { + "id": "slugs/relativeSlug", + "path": "/docs/withSlugs/slugs/relativeSlug", + "sidebar": undefined, + }, + { + "id": "slugs/resolvedSlug", + "path": "/docs/withSlugs/slugs/hey/resolvedSlug", + "sidebar": undefined, + }, + { + "id": "slugs/tryToEscapeSlug", + "path": "/docs/withSlugs/tryToEscapeSlug", + "sidebar": undefined, + }, + ], + "draftIds": [], + "isLast": false, + "label": "withSlugs", + "mainDocId": "rootAbsoluteSlug", + "name": "withSlugs", + "path": "/docs/withSlugs", + "sidebars": { + "docs": { + "link": { + "label": "rootAbsoluteSlug", + "path": "/docs/withSlugs/rootAbsoluteSlug", + }, + }, + }, }, ], - "label": "Extension APIs (label from _category_.yml)", - "link": undefined, - "type": "category", - }, - { - "id": "API/api-end", - "type": "doc", }, - ], -} -`; - -exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 1`] = ` -{ - "description": "API End text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "API/api-end", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/api-overview", - "title": "API Overview", - }, - "permalink": "/docs/API/api-end", - "previous": undefined, - "sidebar": "someSidebar", - "sidebarPosition": 3, - "slug": "/API/api-end", - "source": "@site/docs/3-API/03_api-end.md", - "sourceDirName": "3-API", - "tags": [], - "title": "API End", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 2`] = ` -{ - "description": "API Overview text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "API/api-overview", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/Extension APIs/Plugin API", - "title": "Plugin API", - }, - "permalink": "/docs/API/api-overview", - "previous": { - "permalink": "/docs/API/api-end", - "title": "API End", - }, - "sidebar": "someSidebar", - "sidebarPosition": 0, - "slug": "/API/api-overview", - "source": "@site/docs/3-API/00_api-overview.md", - "sourceDirName": "3-API", - "tags": [], - "title": "API Overview", - "unlisted": false, - "version": "current", -} -`; - -exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 3`] = ` -{ - "description": "Plugin API text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "API/Extension APIs/Plugin API", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/API/Extension APIs/Theme API", - "title": "Theme API", - }, - "permalink": "/docs/API/Extension APIs/Plugin API", - "previous": { - "permalink": "/docs/API/api-overview", - "title": "API Overview", }, - "sidebar": "someSidebar", - "sidebarPosition": 0, - "slug": "/API/Extension APIs/Plugin API", - "source": "@site/docs/3-API/02_Extension APIs/0. Plugin API.md", - "sourceDirName": "3-API/02_Extension APIs", - "tags": [], - "title": "Plugin API", - "unlisted": false, - "version": "current", } `; -exports[`site with partial autogenerated sidebars docs in partially generated sidebar have correct metadata 4`] = ` -{ - "description": "Theme API text", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "API/Extension APIs/Theme API", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/API/Extension APIs/Theme API", - "previous": { - "permalink": "/docs/API/Extension APIs/Plugin API", - "title": "Plugin API", +exports[`versioned website content: route config 1`] = ` +[ + { + "component": "@theme/DocsRoot", + "exact": false, + "path": "/docs", + "routes": [ + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/docs/1.0.0", + "priority": undefined, + "props": { + "version": { + "badge": true, + "banner": "unmaintained", + "className": "docs-version-1.0.0", + "docs": { + "foo/bar": { + "description": "Bar 1.0.0 !", + "id": "foo/bar", + "sidebar": "docs", + "title": "bar", + }, + "foo/baz": { + "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", + "id": "foo/baz", + "sidebar": "docs", + "title": "baz", + }, + "hello": { + "description": "Hello 1.0.0 ! (translated en)", + "id": "hello", + "sidebar": "docs", + "title": "hello", + }, + }, + "docsSidebars": { + "docs": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "foo/bar", + "href": "/docs/1.0.0/foo/barSlug", + "label": "bar", + "type": "link", + "unlisted": false, + }, + { + "className": undefined, + "customProps": undefined, + "docId": "foo/baz", + "href": "/docs/1.0.0/foo/baz", + "label": "baz", + "type": "link", + "unlisted": false, + }, + ], + "label": "Test", + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "hello", + "href": "/docs/1.0.0/", + "label": "hello", + "type": "link", + "unlisted": false, + }, + ], + "label": "Guides", + "type": "category", + }, + ], + }, + "isLast": false, + "label": "1.0.0", + "noIndex": false, + "pluginId": "default", + "version": "1.0.0", + }, + }, + "routes": [ + { + "component": "@theme/DocTagsListPage", + "exact": true, + "path": "/docs/1.0.0/tags", + "props": { + "tags": [ + { + "count": 1, + "description": undefined, + "label": "inlineTag-v1.0.0", + "permalink": "/docs/1.0.0/tags/inline-tag-v-1-0-0", + }, + { + "count": 1, + "description": "globalTag-v1.0.0 description (en)", + "label": "globalTag-v1.0.0 label (en)", + "permalink": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", + }, + ], + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", + "props": { + "tag": { + "allTagsPath": "/docs/1.0.0/tags", + "count": 1, + "description": "globalTag-v1.0.0 description (en)", + "items": [ + { + "description": "Hello 1.0.0 ! (translated en)", + "id": "hello", + "permalink": "/docs/1.0.0/", + "title": "hello", + }, + ], + "label": "globalTag-v1.0.0 label (en)", + "permalink": "/docs/1.0.0/tags/globalTag-v1.0.0 permalink (en)", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/1.0.0/tags/inline-tag-v-1-0-0", + "props": { + "tag": { + "allTagsPath": "/docs/1.0.0/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "Hello 1.0.0 ! (translated en)", + "id": "hello", + "permalink": "/docs/1.0.0/", + "title": "hello", + }, + ], + "label": "inlineTag-v1.0.0", + "permalink": "/docs/1.0.0/tags/inline-tag-v-1-0-0", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/docs/1.0.0", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "i18n/en/docusaurus-plugin-content-docs/version-1.0.0/hello.md", + }, + "modules": { + "content": "@site/i18n/en/docusaurus-plugin-content-docs/version-1.0.0/hello.md", + }, + "path": "/docs/1.0.0/", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-1.0.0/foo/bar.md", + }, + "modules": { + "content": "@site/versioned_docs/version-1.0.0/foo/bar.md", + }, + "path": "/docs/1.0.0/foo/barSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-1.0.0/foo/baz.md", + }, + "modules": { + "content": "@site/versioned_docs/version-1.0.0/foo/baz.md", + }, + "path": "/docs/1.0.0/foo/baz", + "sidebar": "docs", + }, + ], + }, + ], + }, + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/docs/next", + "priority": undefined, + "props": { + "version": { + "badge": true, + "banner": "unreleased", + "className": "docs-version-current", + "docs": { + "foo/bar": { + "description": "This is next version of bar.", + "id": "foo/bar", + "sidebar": "docs", + "title": "bar", + }, + "hello": { + "description": "Hello next !", + "id": "hello", + "sidebar": "docs", + "title": "hello", + }, + "slugs/absoluteSlug": { + "description": "Lorem", + "id": "slugs/absoluteSlug", + "sidebar": undefined, + "title": "absoluteSlug", + }, + "slugs/relativeSlug": { + "description": "Lorem", + "id": "slugs/relativeSlug", + "sidebar": undefined, + "title": "relativeSlug", + }, + "slugs/resolvedSlug": { + "description": "Lorem", + "id": "slugs/resolvedSlug", + "sidebar": undefined, + "title": "resolvedSlug", + }, + "slugs/tryToEscapeSlug": { + "description": "Lorem", + "id": "slugs/tryToEscapeSlug", + "sidebar": undefined, + "title": "tryToEscapeSlug", + }, + }, + "docsSidebars": { + "docs": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "foo/bar", + "href": "/docs/next/foo/barSlug", + "label": "bar", + "type": "link", + "unlisted": false, + }, + ], + "label": "Test", + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "hello", + "href": "/docs/next/", + "label": "hello", + "type": "link", + "unlisted": false, + }, + ], + "label": "Guides", + "type": "category", + }, + ], + }, + "isLast": false, + "label": "Next", + "noIndex": false, + "pluginId": "default", + "version": "current", + }, + }, + "routes": [ + { + "component": "@theme/DocTagsListPage", + "exact": true, + "path": "/docs/next/tags", + "props": { + "tags": [ + { + "count": 1, + "description": undefined, + "label": "barTag 1", + "permalink": "/docs/next/tags/bar-tag-1", + }, + { + "count": 1, + "description": undefined, + "label": "barTag-2", + "permalink": "/docs/next/tags/bar-tag-2", + }, + { + "count": 1, + "description": undefined, + "label": "barTag 3", + "permalink": "/docs/next/tags/barTag-3-permalink", + }, + ], + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/next/tags/bar-tag-1", + "props": { + "tag": { + "allTagsPath": "/docs/next/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "This is next version of bar.", + "id": "foo/bar", + "permalink": "/docs/next/foo/barSlug", + "title": "bar", + }, + ], + "label": "barTag 1", + "permalink": "/docs/next/tags/bar-tag-1", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/next/tags/bar-tag-2", + "props": { + "tag": { + "allTagsPath": "/docs/next/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "This is next version of bar.", + "id": "foo/bar", + "permalink": "/docs/next/foo/barSlug", + "title": "bar", + }, + ], + "label": "barTag-2", + "permalink": "/docs/next/tags/bar-tag-2", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/next/tags/barTag-3-permalink", + "props": { + "tag": { + "allTagsPath": "/docs/next/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "This is next version of bar.", + "id": "foo/bar", + "permalink": "/docs/next/foo/barSlug", + "title": "bar", + }, + ], + "label": "barTag 3", + "permalink": "/docs/next/tags/barTag-3-permalink", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/docs/next", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/hello.md", + }, + "modules": { + "content": "@site/docs/hello.md", + }, + "path": "/docs/next/", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/absoluteSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/absoluteSlug.md", + }, + "path": "/docs/next/absoluteSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/foo/bar.md", + }, + "modules": { + "content": "@site/docs/foo/bar.md", + }, + "path": "/docs/next/foo/barSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/resolvedSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/resolvedSlug.md", + }, + "path": "/docs/next/slugs/hey/resolvedSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/relativeSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/relativeSlug.md", + }, + "path": "/docs/next/slugs/relativeSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "docs/slugs/tryToEscapeSlug.md", + }, + "modules": { + "content": "@site/docs/slugs/tryToEscapeSlug.md", + }, + "path": "/docs/next/tryToEscapeSlug", + }, + ], + }, + ], + }, + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/docs/withSlugs", + "priority": undefined, + "props": { + "version": { + "badge": true, + "banner": "unmaintained", + "className": "docs-version-withSlugs", + "docs": { + "rootAbsoluteSlug": { + "description": "Lorem", + "id": "rootAbsoluteSlug", + "sidebar": "docs", + "title": "rootAbsoluteSlug", + }, + "rootRelativeSlug": { + "description": "Lorem", + "id": "rootRelativeSlug", + "sidebar": undefined, + "title": "rootRelativeSlug", + }, + "rootResolvedSlug": { + "description": "Lorem", + "id": "rootResolvedSlug", + "sidebar": undefined, + "title": "rootResolvedSlug", + }, + "rootTryToEscapeSlug": { + "description": "Lorem", + "id": "rootTryToEscapeSlug", + "sidebar": undefined, + "title": "rootTryToEscapeSlug", + }, + "slugs/absoluteSlug": { + "description": "Lorem", + "id": "slugs/absoluteSlug", + "sidebar": undefined, + "title": "absoluteSlug", + }, + "slugs/relativeSlug": { + "description": "Lorem", + "id": "slugs/relativeSlug", + "sidebar": undefined, + "title": "relativeSlug", + }, + "slugs/resolvedSlug": { + "description": "Lorem", + "id": "slugs/resolvedSlug", + "sidebar": undefined, + "title": "resolvedSlug", + }, + "slugs/tryToEscapeSlug": { + "description": "Lorem", + "id": "slugs/tryToEscapeSlug", + "sidebar": undefined, + "title": "tryToEscapeSlug", + }, + }, + "docsSidebars": { + "docs": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "rootAbsoluteSlug", + "href": "/docs/withSlugs/rootAbsoluteSlug", + "label": "rootAbsoluteSlug", + "type": "link", + "unlisted": false, + }, + ], + "label": "Test", + "type": "category", + }, + ], + }, + "isLast": false, + "label": "withSlugs", + "noIndex": false, + "pluginId": "default", + "version": "withSlugs", + }, + }, + "routes": [ + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/docs/withSlugs", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/slugs/absoluteSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/slugs/absoluteSlug.md", + }, + "path": "/docs/withSlugs/absoluteSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/rootResolvedSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/rootResolvedSlug.md", + }, + "path": "/docs/withSlugs/hey/rootResolvedSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/rootAbsoluteSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/rootAbsoluteSlug.md", + }, + "path": "/docs/withSlugs/rootAbsoluteSlug", + "sidebar": "docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/rootRelativeSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/rootRelativeSlug.md", + }, + "path": "/docs/withSlugs/rootRelativeSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/rootTryToEscapeSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/rootTryToEscapeSlug.md", + }, + "path": "/docs/withSlugs/rootTryToEscapeSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/slugs/resolvedSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/slugs/resolvedSlug.md", + }, + "path": "/docs/withSlugs/slugs/hey/resolvedSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/slugs/relativeSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/slugs/relativeSlug.md", + }, + "path": "/docs/withSlugs/slugs/relativeSlug", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-withSlugs/slugs/tryToEscapeSlug.md", + }, + "modules": { + "content": "@site/versioned_docs/version-withSlugs/slugs/tryToEscapeSlug.md", + }, + "path": "/docs/withSlugs/tryToEscapeSlug", + }, + ], + }, + ], + }, + { + "component": "@theme/DocVersionRoot", + "exact": false, + "path": "/docs", + "priority": -1, + "props": { + "version": { + "badge": true, + "banner": null, + "className": "docs-version-1.0.1", + "docs": { + "foo/bar": { + "description": "Bar 1.0.1 !", + "id": "foo/bar", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "title": "bar", + }, + "hello": { + "description": "Hello 1.0.1 !", + "id": "hello", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + "title": "hello", + }, + }, + "docsSidebars": { + "VersionedSideBarNameDoesNotMatter/docs": [ + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "foo/bar", + "href": "/docs/foo/bar", + "label": "bar", + "type": "link", + "unlisted": false, + }, + ], + "label": "Test", + "type": "category", + }, + { + "collapsed": true, + "collapsible": true, + "items": [ + { + "className": undefined, + "customProps": undefined, + "docId": "hello", + "href": "/docs/", + "label": "hello", + "type": "link", + "unlisted": false, + }, + ], + "label": "Guides", + "type": "category", + }, + ], + }, + "isLast": true, + "label": "1.0.1", + "noIndex": true, + "pluginId": "default", + "version": "1.0.1", + }, + }, + "routes": [ + { + "component": "@theme/DocTagsListPage", + "exact": true, + "path": "/docs/tags", + "props": { + "tags": [ + { + "count": 1, + "description": undefined, + "label": "inlineTag-v1.0.1", + "permalink": "/docs/tags/inline-tag-v-1-0-1", + }, + { + "count": 1, + "description": "globalTag-v1.0.1 description", + "label": "globalTag-v1.0.1 label", + "permalink": "/docs/tags/globalTag-v1.0.1 permalink", + }, + ], + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/tags/globalTag-v1.0.1 permalink", + "props": { + "tag": { + "allTagsPath": "/docs/tags", + "count": 1, + "description": "globalTag-v1.0.1 description", + "items": [ + { + "description": "Hello 1.0.1 !", + "id": "hello", + "permalink": "/docs/", + "title": "hello", + }, + ], + "label": "globalTag-v1.0.1 label", + "permalink": "/docs/tags/globalTag-v1.0.1 permalink", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocTagDocListPage", + "exact": true, + "path": "/docs/tags/inline-tag-v-1-0-1", + "props": { + "tag": { + "allTagsPath": "/docs/tags", + "count": 1, + "description": undefined, + "items": [ + { + "description": "Hello 1.0.1 !", + "id": "hello", + "permalink": "/docs/", + "title": "hello", + }, + ], + "label": "inlineTag-v1.0.1", + "permalink": "/docs/tags/inline-tag-v-1-0-1", + "unlisted": false, + }, + }, + }, + { + "component": "@theme/DocRoot", + "exact": false, + "path": "/docs", + "routes": [ + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-1.0.1/hello.md", + }, + "modules": { + "content": "@site/versioned_docs/version-1.0.1/hello.md", + }, + "path": "/docs/", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + }, + { + "component": "@theme/DocItem", + "exact": true, + "metadata": { + "lastUpdatedAt": undefined, + "sourceFilePath": "versioned_docs/version-1.0.1/foo/bar.md", + }, + "modules": { + "content": "@site/versioned_docs/version-1.0.1/foo/bar.md", + }, + "path": "/docs/foo/bar", + "sidebar": "VersionedSideBarNameDoesNotMatter/docs", + }, + ], + }, + ], + }, + ], }, - "sidebar": "someSidebar", - "sidebarPosition": 1, - "slug": "/API/Extension APIs/Theme API", - "source": "@site/docs/3-API/02_Extension APIs/1. Theme API.md", - "sourceDirName": "3-API/02_Extension APIs", - "tags": [], - "title": "Theme API", - "unlisted": false, - "version": "current", -} +] `; -exports[`site with partial autogenerated sidebars sidebar is partially autogenerated 1`] = ` +exports[`versioned website content: withSlugs version sidebars 1`] = ` { - "someSidebar": [ - { - "id": "API/api-end", - "type": "doc", - }, + "docs": [ { "collapsed": true, "collapsible": true, "items": [ { - "id": "API/api-overview", - "type": "doc", - }, - { - "id": "API/Extension APIs/Plugin API", - "type": "doc", - }, - { - "id": "API/Extension APIs/Theme API", + "id": "rootAbsoluteSlug", "type": "doc", }, ], - "label": "Some category", + "label": "Test", "link": undefined, "type": "category", }, ], } `; - -exports[`versioned website (community) content 1`] = ` -{ - "description": "Team current version (translated)", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "title": "Team title translated", - }, - "id": "team", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/community/next/team", - "previous": undefined, - "sidebar": "community", - "sidebarPosition": undefined, - "slug": "/team", - "source": "@site/i18n/en/docusaurus-plugin-content-docs-community/current/team.md", - "sourceDirName": ".", - "tags": [], - "title": "Team title translated", - "unlisted": false, - "version": "current", -} -`; - -exports[`versioned website (community) content 2`] = ` -{ - "description": "Team 1.0.0", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "team", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/community/team", - "previous": undefined, - "sidebar": "community", - "sidebarPosition": undefined, - "slug": "/team", - "source": "@site/community_versioned_docs/version-1.0.0/team.md", - "sourceDirName": ".", - "tags": [], - "title": "team", - "unlisted": false, - "version": "1.0.0", -} -`; - -exports[`versioned website content 1`] = ` -{ - "description": "This is next version of bar.", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "barSlug", - "tags": [ - "barTag 1", - "barTag-2", - { - "label": "barTag 3", - "permalink": "barTag-3-permalink", - }, - ], - }, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/next/", - "title": "hello", - }, - "permalink": "/docs/next/foo/barSlug", - "previous": undefined, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/barSlug", - "source": "@site/docs/foo/bar.md", - "sourceDirName": "foo", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "barTag 1", - "permalink": "/docs/next/tags/bar-tag-1", - }, - { - "description": undefined, - "inline": true, - "label": "barTag-2", - "permalink": "/docs/next/tags/bar-tag-2", - }, - { - "description": undefined, - "inline": true, - "label": "barTag 3", - "permalink": "/docs/next/tags/barTag-3-permalink", - }, - ], - "title": "bar", - "unlisted": false, - "version": "current", -} -`; - -exports[`versioned website content 2`] = ` -{ - "description": "Bar 1.0.1 !", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "foo/bar", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/", - "title": "hello", - }, - "permalink": "/docs/foo/bar", - "previous": undefined, - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "sidebarPosition": undefined, - "slug": "/foo/bar", - "source": "@site/versioned_docs/version-1.0.1/foo/bar.md", - "sourceDirName": "foo", - "tags": [], - "title": "bar", - "unlisted": false, - "version": "1.0.1", -} -`; - -exports[`versioned website content 3`] = ` -{ - "description": "Hello next !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/next/", - "previous": { - "permalink": "/docs/next/foo/barSlug", - "title": "bar", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/docs/hello.md", - "sourceDirName": ".", - "tags": [], - "title": "hello", - "unlisted": false, - "version": "current", -} -`; - -exports[`versioned website content 4`] = ` -{ - "description": "Hello 1.0.1 !", - "draft": false, - "editUrl": undefined, - "frontMatter": { - "slug": "/", - "tags": [ - "inlineTag-v1.0.1", - "globalTag-v1.0.1", - ], - }, - "id": "hello", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": undefined, - "permalink": "/docs/", - "previous": { - "permalink": "/docs/foo/bar", - "title": "bar", - }, - "sidebar": "VersionedSideBarNameDoesNotMatter/docs", - "sidebarPosition": undefined, - "slug": "/", - "source": "@site/versioned_docs/version-1.0.1/hello.md", - "sourceDirName": ".", - "tags": [ - { - "description": undefined, - "inline": true, - "label": "inlineTag-v1.0.1", - "permalink": "/docs/tags/inline-tag-v-1-0-1", - }, - { - "description": "globalTag-v1.0.1 description", - "inline": false, - "label": "globalTag-v1.0.1 label", - "permalink": "/docs/tags/globalTag-v1.0.1 permalink", - }, - ], - "title": "hello", - "unlisted": false, - "version": "1.0.1", -} -`; - -exports[`versioned website content 5`] = ` -{ - "description": "Baz 1.0.0 ! This will be deleted in next subsequent versions.", - "draft": false, - "editUrl": undefined, - "frontMatter": {}, - "id": "foo/baz", - "lastUpdatedAt": undefined, - "lastUpdatedBy": undefined, - "next": { - "permalink": "/docs/1.0.0/", - "title": "hello", - }, - "permalink": "/docs/1.0.0/foo/baz", - "previous": { - "permalink": "/docs/1.0.0/foo/barSlug", - "title": "bar", - }, - "sidebar": "docs", - "sidebarPosition": undefined, - "slug": "/foo/baz", - "source": "@site/versioned_docs/version-1.0.0/foo/baz.md", - "sourceDirName": "foo", - "tags": [], - "title": "baz", - "unlisted": false, - "version": "1.0.0", -} -`; From f963654c03e37d67735751a7dbf456d04191b760 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 13 Mar 2026 16:49:29 +0100 Subject: [PATCH 17/17] ensure faster key resolution is always exhaustive, no hardcoding of keys --- packages/docusaurus/src/server/configValidation.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index 8825705aa8a6..defc47589b7b 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -567,17 +567,9 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { config.future.faster = {} as FasterConfig; } const fasterDefault = config.future.v4.fasterByDefault; - const fasterKeys: (keyof FasterConfig)[] = [ - 'swcJsLoader', - 'swcJsMinimizer', - 'swcHtmlMinimizer', - 'lightningCssMinimizer', - 'mdxCrossCompilerCache', - 'rspackBundler', - 'rspackPersistentCache', - 'ssgWorkerThreads', - 'gitEagerVcs', - ]; + const fasterKeys = Object.keys( + DEFAULT_FASTER_CONFIG, + ) as (keyof FasterConfig)[]; for (const key of fasterKeys) { if (config.future.faster[key] === undefined) { config.future.faster[key] = fasterDefault;