From 124511f4456afe26913f784b4f4538c8892dfcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 25 Feb 2022 16:00:11 +0100 Subject: [PATCH] chore: prepare v2.0.0-beta.16 release (#6760) --- CHANGELOG.md | 253 ++++ admin/new.docusaurus.io/package.json | 2 +- admin/publish.md | 2 +- lerna.json | 2 +- packages/create-docusaurus/package.json | 4 +- .../templates/classic-typescript/package.json | 8 +- .../templates/classic/package.json | 6 +- .../templates/facebook/package.json | 6 +- .../docusaurus-cssnano-preset/package.json | 2 +- packages/docusaurus-logger/package.json | 2 +- packages/docusaurus-mdx-loader/package.json | 8 +- packages/docusaurus-migrate/package.json | 6 +- .../package.json | 4 +- .../package.json | 14 +- .../package.json | 16 +- .../package.json | 16 +- .../package.json | 12 +- packages/docusaurus-plugin-debug/package.json | 8 +- .../package.json | 8 +- .../package.json | 8 +- .../package.json | 14 +- packages/docusaurus-plugin-pwa/package.json | 14 +- .../docusaurus-plugin-sitemap/package.json | 12 +- .../docusaurus-preset-classic/package.json | 24 +- .../package.json | 2 +- .../docusaurus-theme-classic/package.json | 24 +- packages/docusaurus-theme-common/package.json | 14 +- .../package.json | 12 +- .../package.json | 16 +- .../package.json | 6 +- packages/docusaurus-types/package.json | 2 +- packages/docusaurus-utils-common/package.json | 4 +- .../docusaurus-utils-validation/package.json | 6 +- packages/docusaurus-utils/package.json | 6 +- packages/docusaurus/package.json | 18 +- packages/lqip-loader/package.json | 4 +- packages/stylelint-copyright/package.json | 2 +- website/package.json | 26 +- .../_partials/swizzleWarning.mdx | 5 - .../version-2.0.0-beta.14/advanced/routing.md | 17 - .../api/plugins/plugin-client-redirects.md | 130 -- .../api/plugins/plugin-debug.md | 40 - .../api/plugins/plugin-google-analytics.md | 94 -- .../api/plugins/plugin-google-gtag.md | 100 -- .../api/plugins/plugin-ideal-image.md | 53 - .../api/plugins/plugin-sitemap.md | 37 - .../guides/docs/sidebar.md | 1052 ----------------- .../guides/docs/versioning.md | 216 ---- .../markdown-features-math-equations.mdx | 116 -- .../markdown-features-react.mdx | 218 ---- .../i18n/i18n-tutorial.md | 336 ------ .../version-2.0.0-beta.14/presets.md | 137 --- .../version-2.0.0-beta.14/static-assets.md | 71 -- .../version-2.0.0-beta.14/using-plugins.md | 183 --- .../version-2.0.0-beta.14/using-themes.md | 249 ---- .../advanced/architecture.md | 28 + .../version-2.0.0-beta.16/advanced/client.md | 77 ++ .../version-2.0.0-beta.16/advanced/index.md | 12 + .../version-2.0.0-beta.16/advanced/plugins.md | 129 ++ .../version-2.0.0-beta.16/advanced/routing.md | 279 +++++ .../version-2.0.0-beta.16/advanced/ssg.md | 206 ++++ .../api/docusaurus.config.js.md | 81 +- .../api/plugin-methods/README.md | 12 +- .../api/plugin-methods/_category_.yml | 0 .../plugin-methods/extend-infrastructure.md | 30 +- .../api/plugin-methods/i18n-lifecycles.md | 2 +- .../api/plugin-methods/lifecycle-apis.md | 41 +- .../api/plugin-methods/static-methods.md | 22 +- .../api/plugins/_category_.yml | 0 .../api/plugins/overview.md | 0 .../api/plugins/plugin-client-redirects.md | 98 ++ .../api/plugins/plugin-content-blog.md | 84 +- .../api/plugins/plugin-content-docs.md | 105 +- .../api/plugins/plugin-content-pages.md | 57 +- .../api/plugins/plugin-debug.md | 102 ++ .../api/plugins/plugin-google-analytics.md | 63 + .../api/plugins/plugin-google-gtag.md | 69 ++ .../api/plugins/plugin-ideal-image.md | 79 ++ .../api/plugins/plugin-pwa.md | 0 .../api/plugins/plugin-sitemap.md | 74 ++ .../api/themes/_category_.yml | 0 .../api/themes/overview.md | 0 .../api/themes/theme-classic.md | 0 .../api/themes/theme-configuration.md | 80 +- .../api/themes/theme-live-codeblock.md | 2 +- .../api/themes/theme-search-algolia.md | 2 +- .../docusaurus-asset-example-banner.png | Bin .../assets/docusaurus-asset-example.docx | Bin .../assets/docusaurus-asset-example.xyz | Bin .../blog.mdx | 124 +- .../browser-support.md | 60 +- .../cli.md | 56 +- .../configuration.md | 63 +- .../deployment.mdx | 144 ++- .../docusaurus-core.md | 104 +- .../guides/creating-pages.md | 35 +- .../guides/docs/docs-create-doc.mdx | 18 +- .../guides/docs/docs-introduction.md | 20 +- .../guides/docs/docs-markdown-features.mdx | 8 +- .../guides/docs/docs-multi-instance.mdx | 4 +- .../guides/docs/sidebar/autogenerated.md | 487 ++++++++ .../guides/docs/sidebar/index.md | 201 ++++ .../guides/docs/sidebar/items.md | 591 +++++++++ .../guides/docs/sidebar/multiple-sidebars.md | 142 +++ .../guides/docs/versioning.md | 280 +++++ .../_markdown-partial-example.mdx | 0 .../markdown-features-admonitions.mdx | 80 +- .../markdown-features-assets.mdx | 91 +- .../markdown-features-code-blocks.mdx | 255 ++-- .../markdown-features-head-metadata.mdx | 2 +- .../markdown-features-headings.mdx | 8 +- .../markdown-features-inline-toc.mdx | 75 +- .../markdown-features-intro.mdx | 28 +- .../markdown-features-math-equations.mdx | 208 ++++ .../markdown-features-plugins.mdx | 56 +- .../markdown-features-react.mdx | 465 ++++++++ .../markdown-features-react.module.css | 17 + .../markdown-features-tabs-styles.module.css | 0 .../markdown-features-tabs.mdx | 14 +- .../guides/whats-next.md | 21 + .../i18n/i18n-crowdin.mdx | 63 +- .../i18n/i18n-git.md | 18 +- .../i18n/i18n-introduction.md | 60 +- .../i18n/i18n-tutorial.md | 457 +++++++ .../installation.md | 95 +- .../introduction.md | 84 +- .../migration/migration-automated.md | 0 .../migration/migration-manual.md | 24 +- .../migration/migration-overview.md | 4 +- .../migration/migration-translated-sites.md | 2 +- .../migration/migration-versioned-sites.md | 10 +- .../playground.mdx | 0 .../search.md | 87 +- .../seo.md | 14 +- .../version-2.0.0-beta.16/static-assets.md | 108 ++ .../styling-layout.md | 84 +- .../version-2.0.0-beta.16/swizzling.md | 324 +++++ .../typescript-support.md | 26 +- .../version-2.0.0-beta.16/using-plugins.md | 320 +++++ ...on => version-2.0.0-beta.16-sidebars.json} | 37 +- website/versions.json | 4 +- website/versionsArchived.json | 1 + 142 files changed, 6715 insertions(+), 4145 deletions(-) delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/_partials/swizzleWarning.mdx delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/advanced/routing.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-client-redirects.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-debug.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-analytics.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-gtag.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-ideal-image.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-sitemap.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/guides/docs/sidebar.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-math-equations.mdx delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-react.mdx delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/i18n/i18n-tutorial.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/presets.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/static-assets.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/using-plugins.md delete mode 100644 website/versioned_docs/version-2.0.0-beta.14/using-themes.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/advanced/architecture.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/advanced/client.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/advanced/index.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/advanced/plugins.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/advanced/routing.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/advanced/ssg.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/docusaurus.config.js.md (86%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugin-methods/README.md (91%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugin-methods/_category_.yml (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugin-methods/extend-infrastructure.md (71%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugin-methods/i18n-lifecycles.md (98%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugin-methods/lifecycle-apis.md (88%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugin-methods/static-methods.md (80%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugins/_category_.yml (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugins/overview.md (100%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-client-redirects.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugins/plugin-content-blog.md (85%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugins/plugin-content-docs.md (82%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugins/plugin-content-pages.md (71%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-debug.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-google-analytics.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-google-gtag.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-ideal-image.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/plugins/plugin-pwa.md (100%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/api/plugins/plugin-sitemap.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/themes/_category_.yml (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/themes/overview.md (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/themes/theme-classic.md (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/themes/theme-configuration.md (92%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/themes/theme-live-codeblock.md (95%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/api/themes/theme-search-algolia.md (79%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/assets/docusaurus-asset-example-banner.png (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/assets/docusaurus-asset-example.docx (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/assets/docusaurus-asset-example.xyz (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/blog.mdx (81%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/browser-support.md (52%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/cli.md (78%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/configuration.md (61%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/deployment.mdx (83%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/docusaurus-core.md (83%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/creating-pages.md (75%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/docs/docs-create-doc.mdx (87%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/docs/docs-introduction.md (85%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/docs/docs-markdown-features.mdx (76%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/docs/docs-multi-instance.mdx (94%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/autogenerated.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/index.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/items.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/docs/sidebar/multiple-sidebars.md create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/docs/versioning.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/_markdown-partial-example.mdx (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-admonitions.mdx (72%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-assets.mdx (56%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-code-blocks.mdx (67%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-head-metadata.mdx (99%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-headings.mdx (82%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-inline-toc.mdx (53%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-intro.mdx (78%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-math-equations.mdx rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-plugins.mdx (75%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.mdx create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/markdown-features/markdown-features-react.module.css rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-tabs-styles.module.css (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/guides/markdown-features/markdown-features-tabs.mdx (88%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/guides/whats-next.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/i18n/i18n-crowdin.mdx (88%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/i18n/i18n-git.md (90%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/i18n/i18n-introduction.md (68%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/i18n/i18n-tutorial.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/installation.md (62%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/introduction.md (54%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/migration/migration-automated.md (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/migration/migration-manual.md (95%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/migration/migration-overview.md (98%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/migration/migration-translated-sites.md (98%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/migration/migration-versioned-sites.md (92%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/playground.mdx (100%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/search.md (70%) rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/seo.md (89%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/static-assets.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/styling-layout.md (59%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/swizzling.md rename website/versioned_docs/{version-2.0.0-beta.14 => version-2.0.0-beta.16}/typescript-support.md (75%) create mode 100644 website/versioned_docs/version-2.0.0-beta.16/using-plugins.md rename website/versioned_sidebars/{version-2.0.0-beta.14-sidebars.json => version-2.0.0-beta.16-sidebars.json} (79%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97970472aa30..7eee4e1962b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,258 @@ # Docusaurus 2 Changelog +## 2.0.0-beta.16 (2022-02-25) + +#### :rocket: New Feature + +- `docusaurus-logger`, `docusaurus-module-type-aliases`, `docusaurus-plugin-debug`, `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus-theme-search-algolia`, `docusaurus-types`, `docusaurus` + - [#6243](https://github.com/facebook/docusaurus/pull/6243) feat(core): brand new swizzle CLI experience ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus` + - [#6750](https://github.com/facebook/docusaurus/pull/6750) feat(create): new --package-manager option; interactive package manager selection ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6610](https://github.com/facebook/docusaurus/pull/6610) feat(create): allow specifying a git clone strategy ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6723](https://github.com/facebook/docusaurus/pull/6723) feat: sync color mode between browser tabs ([@lex111](https://github.com/lex111)) +- `docusaurus-theme-search-algolia` + - [#6692](https://github.com/facebook/docusaurus/pull/6692) feat(search-algolia): allow disabling search page and configuring path ([@lex111](https://github.com/lex111)) +- `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6517](https://github.com/facebook/docusaurus/pull/6517) feat(docs,theme-classic): docs breadcrumbs ([@jodyheavener](https://github.com/jodyheavener)) + - [#6519](https://github.com/facebook/docusaurus/pull/6519) feat(content-docs): sidebar item type "html" for rendering pure markup ([@jodyheavener](https://github.com/jodyheavener)) +- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-utils` + - [#6593](https://github.com/facebook/docusaurus/pull/6593) feat(content-blog): infer blog post date from git history ([@felipecrs](https://github.com/felipecrs)) +- `docusaurus-plugin-content-docs` + - [#6619](https://github.com/facebook/docusaurus/pull/6619) feat(content-docs): add custom props front matter ([@TheCatLady](https://github.com/TheCatLady)) + - [#6452](https://github.com/facebook/docusaurus/pull/6452) feat(content-docs): allow explicitly disabling index page for generated category ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog` + - [#6603](https://github.com/facebook/docusaurus/pull/6603) feat(content-blog): allow customizing blog archive component through option ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog`, `docusaurus-theme-classic` + - [#6221](https://github.com/facebook/docusaurus/pull/6221) feat(content-blog): Allow pagination for BlogTagsPostsPage ([@redhoyasa](https://github.com/redhoyasa)) + +#### :boom: Breaking Change + +- `create-docusaurus`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils`, `docusaurus`, `stylelint-copyright` + - [#6752](https://github.com/facebook/docusaurus/pull/6752) chore: upgrade docsearch-react to v3 stable, bump dependencies ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-types` + - [#6729](https://github.com/facebook/docusaurus/pull/6729) refactor: make MDX export a flat TOC list instead of tree ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-types`, `docusaurus-utils-validation`, `docusaurus` + - [#6740](https://github.com/facebook/docusaurus/pull/6740) refactor: remove deprecated Webpack utils & validation escape hatch ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic`, `docusaurus-theme-search-algolia` + - [#6707](https://github.com/facebook/docusaurus/pull/6707) refactor(theme-classic): bias again search metadata toward Algolia DocSearch ([@slorber](https://github.com/slorber)) +- `docusaurus-module-type-aliases`, `docusaurus-theme-common`, `docusaurus` + - [#6651](https://github.com/facebook/docusaurus/pull/6651) refactor: reduce exported members of docusaurus router ([@Josh-Cena](https://github.com/Josh-Cena)) + +#### :bug: Bug Fix + +- `docusaurus-theme-common` + - [#6758](https://github.com/facebook/docusaurus/pull/6758) fix(theme-common): isSamePath should be case-insensitive ([@slorber](https://github.com/slorber)) + - [#6748](https://github.com/facebook/docusaurus/pull/6748) fix(theme-classic): temporarily disable toc heading autoscrolling ([@slorber](https://github.com/slorber)) + - [#6696](https://github.com/facebook/docusaurus/pull/6696) fix(theme-common): do not run useLocationChange when hot reloading ([@lex111](https://github.com/lex111)) + - [#6490](https://github.com/facebook/docusaurus/pull/6490) fix(theme-classic): do not switch color modes when printing ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases`, `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6749](https://github.com/facebook/docusaurus/pull/6749) fix(theme-classic): fix breadcrumb home link bug with new useHomePageRoute() hook ([@slorber](https://github.com/slorber)) +- `docusaurus-plugin-content-docs` + - [#6720](https://github.com/facebook/docusaurus/pull/6720) fix(content-docs): create assets for frontmatter images ([@lebalz](https://github.com/lebalz)) + - [#6592](https://github.com/facebook/docusaurus/pull/6592) fix(content-docs): read last update from inner git repositories ([@felipecrs](https://github.com/felipecrs)) + - [#6477](https://github.com/facebook/docusaurus/pull/6477) fix(content-docs): export versioning utils ([@milesj](https://github.com/milesj)) +- `docusaurus-mdx-loader` + - [#6712](https://github.com/facebook/docusaurus/pull/6712) fix(mdx-loader): make headings containing links properly formatted in ToC ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus` + - [#6701](https://github.com/facebook/docusaurus/pull/6701) fix(cli): disable directory listing in serve ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6607](https://github.com/facebook/docusaurus/pull/6607) fix(cli): log error itself on unhandled rejection ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6500](https://github.com/facebook/docusaurus/pull/6500) fix(cli): allow passing a list of file names to write-heading-ids ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6496](https://github.com/facebook/docusaurus/pull/6496) fix(core): configValidation should allow inline theme functions ([@slorber](https://github.com/slorber)) +- `docusaurus-theme-classic` + - [#6652](https://github.com/facebook/docusaurus/pull/6652) fix(theme-classic): minor BTT button fixes ([@lex111](https://github.com/lex111)) + - [#6612](https://github.com/facebook/docusaurus/pull/6612) fix(theme-classic): make Prism additional languages properly server-side rendered ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6599](https://github.com/facebook/docusaurus/pull/6599) fix(theme-classic): add docSidebar as allowed item in dropdown ([@homotechsual](https://github.com/homotechsual)) + - [#6531](https://github.com/facebook/docusaurus/pull/6531) fix(theme-classic): highlight active collapsible doc category properly ([@lex111](https://github.com/lex111)) + - [#6515](https://github.com/facebook/docusaurus/pull/6515) fix(theme-classic): add key prop for SimpleLinks map ([@kgajera](https://github.com/kgajera)) + - [#6508](https://github.com/facebook/docusaurus/pull/6508) fix(theme-classic): apply width/height for footer logos without href ([@kgajera](https://github.com/kgajera)) +- `docusaurus-utils` + - [#6617](https://github.com/facebook/docusaurus/pull/6617) fix(utils): convert Markdown links in reference-style links with multiple spaces ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6489](https://github.com/facebook/docusaurus/pull/6489) fix(utils): do not resolve Markdown paths with @site prefix ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6478](https://github.com/facebook/docusaurus/pull/6478) fix(utils): Markdown linkification match local paths beginning with http ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-docs`, `docusaurus-theme-classic` + - [#6495](https://github.com/facebook/docusaurus/pull/6495) fix(content-docs): render category with no subitems as a normal link ([@Josh-Cena](https://github.com/Josh-Cena)) + +#### :nail_care: Polish + +- `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6755](https://github.com/facebook/docusaurus/pull/6755) refactor: unify error handling behavior ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus` + - [#6679](https://github.com/facebook/docusaurus/pull/6679) feat(create): better detection of package manager preference ([@lex111](https://github.com/lex111)) + - [#6481](https://github.com/facebook/docusaurus/pull/6481) refactor(init): promote good practices; use site alias ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-docs` + - [#6745](https://github.com/facebook/docusaurus/pull/6745) fix(content-docs): improve sidebar shorthand normalization error message ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6602](https://github.com/facebook/docusaurus/pull/6602) feat(content-docs): allow omitting enclosing array consistently for category shorthand ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6596](https://github.com/facebook/docusaurus/pull/6596) refactor(content-docs): clean up sidebars logic; validate generator returns ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6586](https://github.com/facebook/docusaurus/pull/6586) refactor(content-docs): read category metadata files before autogenerating ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-theme-classic`, `docusaurus` + - [#6730](https://github.com/facebook/docusaurus/pull/6730) refactor: declare all props as interfaces ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-translations` + - [#6711](https://github.com/facebook/docusaurus/pull/6711) chore(theme-translations): complete Korean translations ([@revi](https://github.com/revi)) + - [#6686](https://github.com/facebook/docusaurus/pull/6686) fix(theme-translations): improve Korean translations ([@winterlood](https://github.com/winterlood)) + - [#6635](https://github.com/facebook/docusaurus/pull/6635) refactor(theme-translation): improve Traditional Chinese translation quality ([@toto6038](https://github.com/toto6038)) +- `docusaurus-theme-classic`, `docusaurus-theme-translations` + - [#6674](https://github.com/facebook/docusaurus/pull/6674) fix(theme-classic): improve aria label of color mode toggle ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-theme-classic` + - [#6668](https://github.com/facebook/docusaurus/pull/6668) refactor: recommend using data-theme without html element selector ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-classic` + - [#6622](https://github.com/facebook/docusaurus/pull/6622) refactor(theme-classic): clean up CSS of doc sidebar item ([@lex111](https://github.com/lex111)) +- `docusaurus` + - [#6644](https://github.com/facebook/docusaurus/pull/6644) fix(core): forward ref to Link's anchor element ([@koistya](https://github.com/koistya)) + - [#6646](https://github.com/facebook/docusaurus/pull/6646) fix(cli): make docusaurus clear also remove .yarn/.cache folder ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6306](https://github.com/facebook/docusaurus/pull/6306) feat(core): use react-helmet-async ([@seyoon20087](https://github.com/seyoon20087)) +- `docusaurus-utils-validation` + - [#6656](https://github.com/facebook/docusaurus/pull/6656) feat: allow numbers in plugin ID ([@cdemonchy-pro](https://github.com/cdemonchy-pro)) +- `docusaurus-mdx-loader`, `docusaurus-utils`, `lqip-loader` + - [#6650](https://github.com/facebook/docusaurus/pull/6650) refactor(utils): replace hash with contenthash for file loader ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-mdx-loader`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-preset-classic`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-utils-validation`, `docusaurus-utils` + - [#6615](https://github.com/facebook/docusaurus/pull/6615) fix: remove more peer dependency warnings ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader` + - [#6598](https://github.com/facebook/docusaurus/pull/6598) feat: make Markdown images lazy loaded ([@johnnyreilly](https://github.com/johnnyreilly)) +- `docusaurus-theme-classic`, `docusaurus-theme-common` + - [#6505](https://github.com/facebook/docusaurus/pull/6505) fix(theme-classic): make focused link outlined with JS disabled ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-docs`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-types`, `docusaurus-utils`, `docusaurus` + - [#6507](https://github.com/facebook/docusaurus/pull/6507) refactor: improve internal typing ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-sitemap`, `docusaurus-preset-classic`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-utils-validation`, `docusaurus-utils` + - [#6498](https://github.com/facebook/docusaurus/pull/6498) fix: updating peerDependency fields for yarn berry ([@vidarc](https://github.com/vidarc)) +- `docusaurus-theme-classic`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations` + - [#6482](https://github.com/facebook/docusaurus/pull/6482) feat: mark some text labels as translatable ([@Josh-Cena](https://github.com/Josh-Cena)) + +#### :memo: Documentation + +- Other + - [#6727](https://github.com/facebook/docusaurus/pull/6727) docs: add Blog Matheus Brunelli site to showcase ([@mrbrunelli](https://github.com/mrbrunelli)) + - [#6721](https://github.com/facebook/docusaurus/pull/6721) docs: add Butterfly Documentation to showcase ([@CodeDoctorDE](https://github.com/CodeDoctorDE)) + - [#6710](https://github.com/facebook/docusaurus/pull/6710) docs(website): Add techharvesting to showcase ([@NaseelNiyas](https://github.com/NaseelNiyas)) + - [#6708](https://github.com/facebook/docusaurus/pull/6708) docs: add doc for generated-index keyword/image metadata ([@slorber](https://github.com/slorber)) + - [#6709](https://github.com/facebook/docusaurus/pull/6709) docs(website): fix video responsiveness ([@lex111](https://github.com/lex111)) + - [#6687](https://github.com/facebook/docusaurus/pull/6687) docs: add deep dive video for Docusaurus ([@dmitryvinn](https://github.com/dmitryvinn)) + - [#6704](https://github.com/facebook/docusaurus/pull/6704) docs(website): search doc typo searchParameters ([@slorber](https://github.com/slorber)) + - [#6682](https://github.com/facebook/docusaurus/pull/6682) docs: add redux-cool site to showcase ([@Ruben-Arushanyan](https://github.com/Ruben-Arushanyan)) + - [#6677](https://github.com/facebook/docusaurus/pull/6677) docs: add Rivalis to showcase ([@kalevski](https://github.com/kalevski)) + - [#6676](https://github.com/facebook/docusaurus/pull/6676) docs: add SmartCookieWeb site to showcase ([@CookieJarApps](https://github.com/CookieJarApps)) + - [#6675](https://github.com/facebook/docusaurus/pull/6675) docs: mention that all official themes are TypeScript-covered ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6673](https://github.com/facebook/docusaurus/pull/6673) docs: mention about blog date in front matter ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6672](https://github.com/facebook/docusaurus/pull/6672) refactor(website): extract homepage data from UI; feature text updates ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6670](https://github.com/facebook/docusaurus/pull/6670) docs: add CyberDrain Improved Partner Portal (CIPP) to showcase ([@homotechsual](https://github.com/homotechsual)) + - [#6667](https://github.com/facebook/docusaurus/pull/6667) fix(website): make YT iframe responsive ([@lex111](https://github.com/lex111)) + - [#6659](https://github.com/facebook/docusaurus/pull/6659) docs: add eli5 video to home page ([@dmitryvinn-fb](https://github.com/dmitryvinn-fb)) + - [#6633](https://github.com/facebook/docusaurus/pull/6633) docs: improve wording of using Markdown file paths ([@BigDataWriter](https://github.com/BigDataWriter)) + - [#6624](https://github.com/facebook/docusaurus/pull/6624) docs: add Resoto & Some Engineering Inc. to showcase ([@TheCatLady](https://github.com/TheCatLady)) + - [#6611](https://github.com/facebook/docusaurus/pull/6611) docs: fix bad anchor link syntax ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6591](https://github.com/facebook/docusaurus/pull/6591) docs: improve Github Actions example jobs ([@ebarojas](https://github.com/ebarojas)) + - [#6426](https://github.com/facebook/docusaurus/pull/6426) feat(website): add Tweets section ([@yangshun](https://github.com/yangshun)) + - [#6532](https://github.com/facebook/docusaurus/pull/6532) docs: add SAP Cloud SDK to showcase ([@artemkovalyov](https://github.com/artemkovalyov)) + - [#6513](https://github.com/facebook/docusaurus/pull/6513) docs: clean up CONTRIBUTING ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6501](https://github.com/facebook/docusaurus/pull/6501) docs: add Cloudflare pages deployment guide ([@apidev234](https://github.com/apidev234)) + - [#6499](https://github.com/facebook/docusaurus/pull/6499) docs: mention how env vars can be read ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6492](https://github.com/facebook/docusaurus/pull/6492) docs: mention where to find the sitemap ([@tamalweb](https://github.com/tamalweb)) + - [#6491](https://github.com/facebook/docusaurus/pull/6491) docs: add developers.verida to showcase ([@nick-verida](https://github.com/nick-verida)) + - [#6414](https://github.com/facebook/docusaurus/pull/6414) feat(website): new plugin to load CHANGELOG and render as blog ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6404](https://github.com/facebook/docusaurus/pull/6404) docs: elaborate on Markdown asset linking; document pathname:// protocol ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6484](https://github.com/facebook/docusaurus/pull/6484) docs: remove mention that CDN resources are cached cross-domain ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6429](https://github.com/facebook/docusaurus/pull/6429) refactor: self-host KaTeX assets ([@pranabdas](https://github.com/pranabdas)) + - [#6483](https://github.com/facebook/docusaurus/pull/6483) docs: mark a lot of website texts as translatable ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-preset-classic` + - [#6627](https://github.com/facebook/docusaurus/pull/6627) docs: fix presets documentation link ([@thedanielhanke](https://github.com/thedanielhanke)) + +#### :house: Internal + +- `docusaurus-theme-classic` + - [#6759](https://github.com/facebook/docusaurus/pull/6759) refactor(theme-classic): merge CSS files for Heading ([@slorber](https://github.com/slorber)) + - [#6584](https://github.com/facebook/docusaurus/pull/6584) misc: enable jsx-key eslint rule ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate` + - [#6756](https://github.com/facebook/docusaurus/pull/6756) test: sort migration test FS mock calls ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6609](https://github.com/facebook/docusaurus/pull/6609) refactor(migrate): change internal methods' parameter style ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6476](https://github.com/facebook/docusaurus/pull/6476) chore: fix Stylelint globs for editor support ([@nschonni](https://github.com/nschonni)) +- `docusaurus-plugin-content-docs`, `docusaurus-theme-classic` + - [#6744](https://github.com/facebook/docusaurus/pull/6744) fix(content-docs): properly display collocated social card image ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases`, `docusaurus-types`, `docusaurus` + - [#6742](https://github.com/facebook/docusaurus/pull/6742) refactor: improve client modules types ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases` + - [#6741](https://github.com/facebook/docusaurus/pull/6741) chore(module-type-aliases): add react as peer dependency ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6658](https://github.com/facebook/docusaurus/pull/6658) refactor(module-aliases): remove react-helmet dependency ([@Josh-Cena](https://github.com/Josh-Cena)) +- Other + - [#6726](https://github.com/facebook/docusaurus/pull/6726) misc: improve bug report template ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6512](https://github.com/facebook/docusaurus/pull/6512) misc: configure linguist behavior to show better language stats ([@Josh-Cena](https://github.com/Josh-Cena)) + - [#6487](https://github.com/facebook/docusaurus/pull/6487) chore: fix codesandbox example link + mention npm publish recovery ([@slorber](https://github.com/slorber)) + - [#6486](https://github.com/facebook/docusaurus/pull/6486) chore: update examples for beta.15 ([@slorber](https://github.com/slorber)) + - [#6485](https://github.com/facebook/docusaurus/pull/6485) fix(website): bad translate tags without default translation ([@slorber](https://github.com/slorber)) +- `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6716](https://github.com/facebook/docusaurus/pull/6716) refactor: ensure lodash is default-imported ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-logger`, `docusaurus-migrate`, `docusaurus` + - [#6661](https://github.com/facebook/docusaurus/pull/6661) refactor: convert CLI entry points to ESM; migrate create-docusaurus to ESM ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases`, `docusaurus-theme-common`, `docusaurus` + - [#6651](https://github.com/facebook/docusaurus/pull/6651) refactor: reduce exported members of docusaurus router ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-classic` + - [#6629](https://github.com/facebook/docusaurus/pull/6629) refactor: move module declarations for non-route components to theme-classic ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-plugin-pwa`, `docusaurus-theme-classic` + - [#6614](https://github.com/facebook/docusaurus/pull/6614) refactor: remove Babel plugins that are included in preset-env ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-module-type-aliases`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-translations`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus` + - [#6605](https://github.com/facebook/docusaurus/pull/6605) chore: fix ESLint warnings, restrict export all syntax ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia` + - [#6583](https://github.com/facebook/docusaurus/pull/6583) refactor(live-codeblock): migrate theme to TS ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-theme-common`, `docusaurus-utils`, `docusaurus`, `lqip-loader` + - [#6524](https://github.com/facebook/docusaurus/pull/6524) refactor: enforce named capture groups; clean up regexes ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate`, `docusaurus-plugin-content-docs`, `docusaurus` + - [#6521](https://github.com/facebook/docusaurus/pull/6521) refactor: mark all functions that import external modules as async ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-cssnano-preset`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-module-type-aliases`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-types`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `stylelint-copyright` + - [#6514](https://github.com/facebook/docusaurus/pull/6514) chore: clean up ESLint config, enable a few rules ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-types`, `docusaurus` + - [#6511](https://github.com/facebook/docusaurus/pull/6511) refactor(core): convert theme-fallback to TS ([@Josh-Cena](https://github.com/Josh-Cena)) +- `create-docusaurus`, `docusaurus-utils` + - [#6506](https://github.com/facebook/docusaurus/pull/6506) test: add test for readOutputHTMLFile ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-migrate`, `docusaurus-theme-common` + - [#6502](https://github.com/facebook/docusaurus/pull/6502) refactor: fix all eslint warnings ([@Josh-Cena](https://github.com/Josh-Cena)) +- `docusaurus-mdx-loader`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus` + - [#6474](https://github.com/facebook/docusaurus/pull/6474) test: rename 'fixtures' to '**fixtures**' ([@nschonni](https://github.com/nschonni)) + +#### :running_woman: Performance + +- `create-docusaurus`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils`, `docusaurus` + - [#6725](https://github.com/facebook/docusaurus/pull/6725) refactor: convert all fs methods to async ([@Josh-Cena](https://github.com/Josh-Cena)) + +#### Committers: 38 + +- Alexey Pyltsyn ([@lex111](https://github.com/lex111)) +- Artem Kovalov ([@artemkovalyov](https://github.com/artemkovalyov)) +- Balthasar Hofer ([@lebalz](https://github.com/lebalz)) +- Clement Demonchy ([@cdemonchy-pro](https://github.com/cdemonchy-pro)) +- CodeDoctor ([@CodeDoctorDE](https://github.com/CodeDoctorDE)) +- Daniel Hanke ([@thedanielhanke](https://github.com/thedanielhanke)) +- Daniel Kalevski ([@kalevski](https://github.com/kalevski)) +- Dmitry Vinnik ([@dmitryvinn](https://github.com/dmitryvinn)) +- Dmitry Vinnik | Meta ([@dmitryvinn-fb](https://github.com/dmitryvinn-fb)) +- Erick Zhao ([@erickzhao](https://github.com/erickzhao)) +- Everardo J. Barojas M. ([@ebarojas](https://github.com/ebarojas)) +- Felipe Santos ([@felipecrs](https://github.com/felipecrs)) +- Gaurish ([@apidev234](https://github.com/apidev234)) +- Hong Yongmin ([@revi](https://github.com/revi)) +- Jody Heavener ([@jodyheavener](https://github.com/jodyheavener)) +- John Reilly ([@johnnyreilly](https://github.com/johnnyreilly)) +- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena)) +- Kishan Gajera ([@kgajera](https://github.com/kgajera)) +- Konstantin Tarkus ([@koistya](https://github.com/koistya)) +- Matheus Ricardo Brunelli ([@mrbrunelli](https://github.com/mrbrunelli)) +- Matthew Ailes ([@vidarc](https://github.com/vidarc)) +- Mikey O'Toole ([@homotechsual](https://github.com/homotechsual)) +- Miles Johnson ([@milesj](https://github.com/milesj)) +- Muhammad Redho Ayassa ([@redhoyasa](https://github.com/redhoyasa)) +- Naseel Niyas ([@NaseelNiyas](https://github.com/NaseelNiyas)) +- Nick Schonning ([@nschonni](https://github.com/nschonni)) +- Pranab Das ([@pranabdas](https://github.com/pranabdas)) +- Ruben Arushanyan ([@Ruben-Arushanyan](https://github.com/Ruben-Arushanyan)) +- Sébastien Lorber ([@slorber](https://github.com/slorber)) +- Tamal Web ([@tamalweb](https://github.com/tamalweb)) +- Yangshun Tay ([@yangshun](https://github.com/yangshun)) +- [@BigDataWriter](https://github.com/BigDataWriter) +- [@CookieJarApps](https://github.com/CookieJarApps) +- [@TheCatLady](https://github.com/TheCatLady) +- [@nick-verida](https://github.com/nick-verida) +- [@seyoon20087](https://github.com/seyoon20087) +- [@toto6038](https://github.com/toto6038) +- 이정환 ([@winterlood](https://github.com/winterlood)) + ## 2.0.0-beta.15 (2022-01-26) #### :rocket: New Feature diff --git a/admin/new.docusaurus.io/package.json b/admin/new.docusaurus.io/package.json index 1e327207b7f8..2e4a67e1815a 100644 --- a/admin/new.docusaurus.io/package.json +++ b/admin/new.docusaurus.io/package.json @@ -1,6 +1,6 @@ { "name": "new.docusaurus.io", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "private": true, "scripts": { "start": "netlify dev" diff --git a/admin/publish.md b/admin/publish.md index 699ab5106a70..fef93b58796c 100644 --- a/admin/publish.md +++ b/admin/publish.md @@ -118,7 +118,7 @@ You should still be on your local branch `/` Make a commit/push, create a pull request with the changes. -Example PR: [#3114](https://github.com/facebook/docusaurus/pull/5098), using title such as `chore(v2): prepare v2.0.0-beta.0 release` +Example PR: [#3114](https://github.com/facebook/docusaurus/pull/5098), using title such as `chore: prepare v2.0.0-beta.0 release` **Don't merge it yet**, but wait for the CI checks to complete. diff --git a/lerna.json b/lerna.json index 61fe6362c78f..41adf56aa9f8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "npmClient": "yarn", "useWorkspaces": true, "changelog": { diff --git a/packages/create-docusaurus/package.json b/packages/create-docusaurus/package.json index 7eb246bf5c84..692d3cbdfd9e 100755 --- a/packages/create-docusaurus/package.json +++ b/packages/create-docusaurus/package.json @@ -1,6 +1,6 @@ { "name": "create-docusaurus", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Create Docusaurus apps easily.", "type": "module", "repository": { @@ -22,7 +22,7 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.15", + "@docusaurus/logger": "2.0.0-beta.16", "commander": "^5.1.0", "fs-extra": "^10.0.1", "lodash": "^4.17.21", diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index 2a0dd4fa2dff..18612453b377 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -1,6 +1,6 @@ { "name": "docusaurus-2-classic-typescript-template", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -15,8 +15,8 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/preset-classic": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/preset-classic": "2.0.0-beta.16", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "prism-react-renderer": "^1.2.1", @@ -24,7 +24,7 @@ "react-dom": "^17.0.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", "@tsconfig/docusaurus": "^1.0.4", "typescript": "^4.5.2" }, diff --git a/packages/create-docusaurus/templates/classic/package.json b/packages/create-docusaurus/templates/classic/package.json index 3df1d1436177..5061d05e73fa 100644 --- a/packages/create-docusaurus/templates/classic/package.json +++ b/packages/create-docusaurus/templates/classic/package.json @@ -1,6 +1,6 @@ { "name": "docusaurus-2-classic-template", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -14,8 +14,8 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/preset-classic": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/preset-classic": "2.0.0-beta.16", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "prism-react-renderer": "^1.2.1", diff --git a/packages/create-docusaurus/templates/facebook/package.json b/packages/create-docusaurus/templates/facebook/package.json index 51fa4edee7a8..0a72c0121cc2 100644 --- a/packages/create-docusaurus/templates/facebook/package.json +++ b/packages/create-docusaurus/templates/facebook/package.json @@ -1,6 +1,6 @@ { "name": "docusaurus-2-facebook-template", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -18,8 +18,8 @@ "format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\"" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/preset-classic": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/preset-classic": "2.0.0-beta.16", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "react": "^17.0.1", diff --git a/packages/docusaurus-cssnano-preset/package.json b/packages/docusaurus-cssnano-preset/package.json index 55d6219b029a..3195f10cb1db 100644 --- a/packages/docusaurus-cssnano-preset/package.json +++ b/packages/docusaurus-cssnano-preset/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/cssnano-preset", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Advanced cssnano preset for maximum optimization.", "main": "index.js", "license": "MIT", diff --git a/packages/docusaurus-logger/package.json b/packages/docusaurus-logger/package.json index c59bb4ca406c..28f949c75cd0 100644 --- a/packages/docusaurus-logger/package.json +++ b/packages/docusaurus-logger/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/logger", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "An encapsulated logger for semantically formatting console messages.", "main": "./lib/index.js", "repository": { diff --git a/packages/docusaurus-mdx-loader/package.json b/packages/docusaurus-mdx-loader/package.json index b3018d2f80b6..d27839e845d3 100644 --- a/packages/docusaurus-mdx-loader/package.json +++ b/packages/docusaurus-mdx-loader/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/mdx-loader", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docusaurus Loader for MDX", "main": "lib/index.js", "types": "src/mdx-loader.d.ts", @@ -20,8 +20,8 @@ "dependencies": { "@babel/parser": "^7.17.3", "@babel/traverse": "^7.17.3", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", "@mdx-js/mdx": "^1.6.22", "escape-html": "^1.0.3", "file-loader": "^6.2.0", @@ -36,7 +36,7 @@ "webpack": "^5.69.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/types": "2.0.0-beta.16", "@types/escape-html": "^1.0.1", "@types/mdast": "^3.0.7", "@types/stringify-object": "^3.3.1", diff --git a/packages/docusaurus-migrate/package.json b/packages/docusaurus-migrate/package.json index a98b598426d7..3ec66f9ed719 100644 --- a/packages/docusaurus-migrate/package.json +++ b/packages/docusaurus-migrate/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/migrate", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "A CLI tool to migrate from older versions of Docusaurus.", "main": "lib/index.js", "license": "MIT", @@ -24,8 +24,8 @@ }, "dependencies": { "@babel/preset-env": "^7.16.11", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", "@mapbox/hast-util-to-jsx": "^2.0.0", "color": "^4.0.1", "commander": "^5.1.0", diff --git a/packages/docusaurus-module-type-aliases/package.json b/packages/docusaurus-module-type-aliases/package.json index e3e0603cbc8a..09f47a60b778 100644 --- a/packages/docusaurus-module-type-aliases/package.json +++ b/packages/docusaurus-module-type-aliases/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/module-type-aliases", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docusaurus module type aliases.", "types": "./src/index.d.ts", "publishConfig": { @@ -12,7 +12,7 @@ "directory": "packages/docusaurus-module-type-aliases" }, "dependencies": { - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/types": "2.0.0-beta.16", "@types/react": "*", "@types/react-router-config": "*", "@types/react-router-dom": "*", diff --git a/packages/docusaurus-plugin-client-redirects/package.json b/packages/docusaurus-plugin-client-redirects/package.json index 322825133d3e..2881cf107c21 100644 --- a/packages/docusaurus-plugin-client-redirects/package.json +++ b/packages/docusaurus-plugin-client-redirects/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-client-redirects", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Client redirects plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-client-redirects.d.ts", @@ -18,18 +18,18 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-common": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-common": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "eta": "^1.12.3", "fs-extra": "^10.0.1", "lodash": "^4.17.21", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-content-blog/package.json b/packages/docusaurus-plugin-content-blog/package.json index 816263ac6098..40607d9cb9b0 100644 --- a/packages/docusaurus-plugin-content-blog/package.json +++ b/packages/docusaurus-plugin-content-blog/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-content-blog", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Blog plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-content-blog.d.ts", @@ -18,12 +18,12 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/mdx-loader": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-common": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/mdx-loader": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-common": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "cheerio": "^1.0.0-rc.10", "feed": "^4.2.2", "fs-extra": "^10.0.1", @@ -35,7 +35,7 @@ "webpack": "^5.69.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/types": "2.0.0-beta.16", "escape-string-regexp": "^4.0.0" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-content-docs/package.json b/packages/docusaurus-plugin-content-docs/package.json index ac937d5741aa..79e30d87495b 100644 --- a/packages/docusaurus-plugin-content-docs/package.json +++ b/packages/docusaurus-plugin-content-docs/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-content-docs", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docs plugin for Docusaurus.", "main": "lib/index.js", "exports": { @@ -23,11 +23,11 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/mdx-loader": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/mdx-loader": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "combine-promises": "^1.1.0", "fs-extra": "^10.0.1", "import-fresh": "^3.3.0", @@ -39,8 +39,8 @@ "webpack": "^5.69.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", + "@docusaurus/types": "2.0.0-beta.16", "@types/js-yaml": "^4.0.5", "@types/picomatch": "^2.3.0", "commander": "^5.1.0", diff --git a/packages/docusaurus-plugin-content-pages/package.json b/packages/docusaurus-plugin-content-pages/package.json index 01f32d9003e7..2e8dfd09057c 100644 --- a/packages/docusaurus-plugin-content-pages/package.json +++ b/packages/docusaurus-plugin-content-pages/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-content-pages", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Pages plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-content-pages.d.ts", @@ -18,17 +18,17 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/mdx-loader": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/mdx-loader": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "fs-extra": "^10.0.1", "remark-admonitions": "^1.2.1", "tslib": "^2.3.1", "webpack": "^5.69.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-debug/package.json b/packages/docusaurus-plugin-debug/package.json index 713aa09c1d6c..215f9eeb28b4 100644 --- a/packages/docusaurus-plugin-debug/package.json +++ b/packages/docusaurus-plugin-debug/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-debug", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Debug plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-debug.d.ts", @@ -18,14 +18,14 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", "fs-extra": "^10.0.1", "react-json-view": "^1.21.3", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-google-analytics/package.json b/packages/docusaurus-plugin-google-analytics/package.json index 691c3099fb0d..d17f9495fadc 100644 --- a/packages/docusaurus-plugin-google-analytics/package.json +++ b/packages/docusaurus-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-google-analytics", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Global analytics (analytics.js) plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-google-analytics.d.ts", @@ -18,12 +18,12 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-google-gtag/package.json b/packages/docusaurus-plugin-google-gtag/package.json index 21933fc5a7d5..5a734a11a3d6 100644 --- a/packages/docusaurus-plugin-google-gtag/package.json +++ b/packages/docusaurus-plugin-google-gtag/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-google-gtag", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Global Site Tag (gtag.js) plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-google-gtag.d.ts", @@ -18,12 +18,12 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-plugin-ideal-image/package.json b/packages/docusaurus-plugin-ideal-image/package.json index c162e473fcbb..bd3c156310dd 100644 --- a/packages/docusaurus-plugin-ideal-image/package.json +++ b/packages/docusaurus-plugin-ideal-image/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-ideal-image", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).", "main": "lib/index.js", "types": "src/plugin-ideal-image.d.ts", @@ -21,11 +21,11 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/lqip-loader": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/lqip-loader": "2.0.0-beta.16", "@docusaurus/responsive-loader": "^1.7.0", - "@docusaurus/theme-translations": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/theme-translations": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "@endiliey/react-ideal-image": "^0.0.11", "react-waypoint": "^10.1.0", "sharp": "^0.30.1", @@ -33,8 +33,8 @@ "webpack": "^5.69.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", + "@docusaurus/types": "2.0.0-beta.16", "fs-extra": "^10.0.1" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 8d3a56d8572a..fd10d28ef9e2 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-pwa", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docusaurus Plugin to add PWA support.", "main": "lib/index.js", "types": "src/plugin-pwa.d.ts", @@ -22,11 +22,11 @@ "dependencies": { "@babel/core": "^7.17.5", "@babel/preset-env": "^7.16.11", - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/theme-common": "2.0.0-beta.15", - "@docusaurus/theme-translations": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/theme-common": "2.0.0-beta.16", + "@docusaurus/theme-translations": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "babel-loader": "^8.2.3", "clsx": "^1.1.1", "core-js": "^3.21.0", @@ -39,7 +39,7 @@ "workbox-window": "^6.5.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", "fs-extra": "^10.0.1" }, "peerDependencies": { diff --git a/packages/docusaurus-plugin-sitemap/package.json b/packages/docusaurus-plugin-sitemap/package.json index 9c1f918a0f9b..43c1841ab495 100644 --- a/packages/docusaurus-plugin-sitemap/package.json +++ b/packages/docusaurus-plugin-sitemap/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/plugin-sitemap", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Simple sitemap generation plugin for Docusaurus.", "main": "lib/index.js", "types": "src/plugin-sitemap.d.ts", @@ -18,16 +18,16 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-common": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-common": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "fs-extra": "^10.0.1", "sitemap": "^7.1.1", "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-preset-classic/package.json b/packages/docusaurus-preset-classic/package.json index 1e87dcc106ae..93197f8ecf13 100644 --- a/packages/docusaurus-preset-classic/package.json +++ b/packages/docusaurus-preset-classic/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/preset-classic", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Classic preset for Docusaurus.", "main": "lib/index.js", "types": "src/preset-classic.d.ts", @@ -18,17 +18,17 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/plugin-content-blog": "2.0.0-beta.15", - "@docusaurus/plugin-content-docs": "2.0.0-beta.15", - "@docusaurus/plugin-content-pages": "2.0.0-beta.15", - "@docusaurus/plugin-debug": "2.0.0-beta.15", - "@docusaurus/plugin-google-analytics": "2.0.0-beta.15", - "@docusaurus/plugin-google-gtag": "2.0.0-beta.15", - "@docusaurus/plugin-sitemap": "2.0.0-beta.15", - "@docusaurus/theme-classic": "2.0.0-beta.15", - "@docusaurus/theme-common": "2.0.0-beta.15", - "@docusaurus/theme-search-algolia": "2.0.0-beta.15" + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/plugin-content-blog": "2.0.0-beta.16", + "@docusaurus/plugin-content-docs": "2.0.0-beta.16", + "@docusaurus/plugin-content-pages": "2.0.0-beta.16", + "@docusaurus/plugin-debug": "2.0.0-beta.16", + "@docusaurus/plugin-google-analytics": "2.0.0-beta.16", + "@docusaurus/plugin-google-gtag": "2.0.0-beta.16", + "@docusaurus/plugin-sitemap": "2.0.0-beta.16", + "@docusaurus/theme-classic": "2.0.0-beta.16", + "@docusaurus/theme-common": "2.0.0-beta.16", + "@docusaurus/theme-search-algolia": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-remark-plugin-npm2yarn/package.json b/packages/docusaurus-remark-plugin-npm2yarn/package.json index e43cbd4d7546..40c815b4b704 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/package.json +++ b/packages/docusaurus-remark-plugin-npm2yarn/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/remark-plugin-npm2yarn", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Remark plugin for converting npm commands to Yarn commands as tabs.", "main": "lib/index.js", "publishConfig": { diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index e91afe812a75..b851f36496c8 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-classic", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Classic theme for Docusaurus", "main": "lib/index.js", "types": "src/theme-classic.d.ts", @@ -21,15 +21,15 @@ "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/plugin-content-blog": "2.0.0-beta.15", - "@docusaurus/plugin-content-docs": "2.0.0-beta.15", - "@docusaurus/plugin-content-pages": "2.0.0-beta.15", - "@docusaurus/theme-common": "2.0.0-beta.15", - "@docusaurus/theme-translations": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-common": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/plugin-content-blog": "2.0.0-beta.16", + "@docusaurus/plugin-content-docs": "2.0.0-beta.16", + "@docusaurus/plugin-content-pages": "2.0.0-beta.16", + "@docusaurus/theme-common": "2.0.0-beta.16", + "@docusaurus/theme-translations": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-common": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "@mdx-js/react": "^1.6.22", "clsx": "^1.1.1", "copy-text-to-clipboard": "^3.0.1", @@ -42,8 +42,8 @@ "rtlcss": "^3.3.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", + "@docusaurus/types": "2.0.0-beta.16", "@types/mdx-js__react": "^1.5.5", "@types/prismjs": "^1.26.0", "@types/rtlcss": "^3.1.2", diff --git a/packages/docusaurus-theme-common/package.json b/packages/docusaurus-theme-common/package.json index ca34b76256ae..bf07d54ce9c6 100644 --- a/packages/docusaurus-theme-common/package.json +++ b/packages/docusaurus-theme-common/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-common", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Common code for Docusaurus themes.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,10 +18,10 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", - "@docusaurus/plugin-content-blog": "2.0.0-beta.15", - "@docusaurus/plugin-content-docs": "2.0.0-beta.15", - "@docusaurus/plugin-content-pages": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", + "@docusaurus/plugin-content-blog": "2.0.0-beta.16", + "@docusaurus/plugin-content-docs": "2.0.0-beta.16", + "@docusaurus/plugin-content-pages": "2.0.0-beta.16", "clsx": "^1.1.1", "parse-numeric-range": "^1.3.0", "prism-react-renderer": "^1.3.1", @@ -29,8 +29,8 @@ "utility-types": "^3.10.0" }, "devDependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/types": "2.0.0-beta.16", "@testing-library/react-hooks": "^7.0.2", "fs-extra": "^10.0.1", "lodash": "^4.17.21" diff --git a/packages/docusaurus-theme-live-codeblock/package.json b/packages/docusaurus-theme-live-codeblock/package.json index 828d3f150206..258ae2769e6c 100644 --- a/packages/docusaurus-theme-live-codeblock/package.json +++ b/packages/docusaurus-theme-live-codeblock/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-live-codeblock", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docusaurus live code block component.", "main": "lib/index.js", "types": "src/theme-live-codeblock.d.ts", @@ -21,10 +21,10 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/theme-common": "2.0.0-beta.15", - "@docusaurus/theme-translations": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/theme-common": "2.0.0-beta.16", + "@docusaurus/theme-translations": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "@philpl/buble": "^0.19.7", "clsx": "^1.1.1", "fs-extra": "^10.0.1", @@ -32,7 +32,7 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/types": "2.0.0-beta.16", "@types/buble": "^0.20.1" }, "peerDependencies": { diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json index a6c7b867aaea..9b3c3f56be48 100644 --- a/packages/docusaurus-theme-search-algolia/package.json +++ b/packages/docusaurus-theme-search-algolia/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-search-algolia", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Algolia search component for Docusaurus.", "main": "lib/index.js", "exports": { @@ -26,12 +26,12 @@ }, "dependencies": { "@docsearch/react": "^3.0.0", - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/theme-common": "2.0.0-beta.15", - "@docusaurus/theme-translations": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/theme-common": "2.0.0-beta.16", + "@docusaurus/theme-translations": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "algoliasearch": "^4.12.1", "algoliasearch-helper": "^3.7.0", "clsx": "^1.1.1", @@ -42,7 +42,7 @@ "utility-types": "^3.10.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15" + "@docusaurus/module-type-aliases": "2.0.0-beta.16" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0", diff --git a/packages/docusaurus-theme-translations/package.json b/packages/docusaurus-theme-translations/package.json index 63421ce1e50a..83ed2a98d8dc 100644 --- a/packages/docusaurus-theme-translations/package.json +++ b/packages/docusaurus-theme-translations/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/theme-translations", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Docusaurus theme translations.", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -23,8 +23,8 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", "lodash": "^4.17.21" }, "engines": { diff --git a/packages/docusaurus-types/package.json b/packages/docusaurus-types/package.json index 391a9cc6a6a2..3cc1066a3023 100644 --- a/packages/docusaurus-types/package.json +++ b/packages/docusaurus-types/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/types", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Common types for Docusaurus packages.", "types": "./src/index.d.ts", "publishConfig": { diff --git a/packages/docusaurus-utils-common/package.json b/packages/docusaurus-utils-common/package.json index e9711757a05f..49b59e47100f 100644 --- a/packages/docusaurus-utils-common/package.json +++ b/packages/docusaurus-utils-common/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/utils-common", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Common (Node/Browser) utility functions for Docusaurus packages.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -21,7 +21,7 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15" + "@docusaurus/types": "2.0.0-beta.16" }, "engines": { "node": ">=14" diff --git a/packages/docusaurus-utils-validation/package.json b/packages/docusaurus-utils-validation/package.json index d0c15eef273c..8bb8ee8e5e81 100644 --- a/packages/docusaurus-utils-validation/package.json +++ b/packages/docusaurus-utils-validation/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/utils-validation", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Node validation utility functions for Docusaurus packages.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,8 +18,8 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", "joi": "^17.6.0", "tslib": "^2.3.1" }, diff --git a/packages/docusaurus-utils/package.json b/packages/docusaurus-utils/package.json index 6afd55554b4a..fda05cf41027 100644 --- a/packages/docusaurus-utils/package.json +++ b/packages/docusaurus-utils/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/utils", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Node utility functions for Docusaurus packages.", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -18,7 +18,7 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.15", + "@docusaurus/logger": "2.0.0-beta.16", "@svgr/webpack": "^6.0.0", "file-loader": "^6.2.0", "fs-extra": "^10.0.1", @@ -38,7 +38,7 @@ "node": ">=14" }, "devDependencies": { - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/types": "2.0.0-beta.16", "@types/dedent": "^0.7.0", "@types/github-slugger": "^1.3.0", "@types/micromatch": "^4.0.2", diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 277a44ffd1e3..8a9602b5cfc9 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -1,7 +1,7 @@ { "name": "@docusaurus/core", "description": "Easy to Maintain Open Source Documentation Websites", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "license": "MIT", "publishConfig": { "access": "public" @@ -41,13 +41,13 @@ "@babel/runtime": "^7.17.2", "@babel/runtime-corejs3": "^7.17.2", "@babel/traverse": "^7.17.3", - "@docusaurus/cssnano-preset": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/mdx-loader": "2.0.0-beta.15", + "@docusaurus/cssnano-preset": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/mdx-loader": "2.0.0-beta.16", "@docusaurus/react-loadable": "5.5.2", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-common": "2.0.0-beta.15", - "@docusaurus/utils-validation": "2.0.0-beta.15", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-common": "2.0.0-beta.16", + "@docusaurus/utils-validation": "2.0.0-beta.16", "@slorber/static-site-generator-webpack-plugin": "^4.0.1", "@svgr/webpack": "^6.2.1", "autoprefixer": "^10.4.2", @@ -106,8 +106,8 @@ "webpackbar": "^5.0.2" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-beta.15", - "@docusaurus/types": "2.0.0-beta.15", + "@docusaurus/module-type-aliases": "2.0.0-beta.16", + "@docusaurus/types": "2.0.0-beta.16", "@types/detect-port": "^1.3.2", "@types/nprogress": "^0.2.0", "@types/react-dom": "^17.0.11", diff --git a/packages/lqip-loader/package.json b/packages/lqip-loader/package.json index 0aa247a44e9a..bdb5c9393560 100644 --- a/packages/lqip-loader/package.json +++ b/packages/lqip-loader/package.json @@ -1,6 +1,6 @@ { "name": "@docusaurus/lqip-loader", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Low Quality Image Placeholders (LQIP) loader for webpack.", "main": "lib/index.js", "publishConfig": { @@ -17,7 +17,7 @@ }, "license": "MIT", "dependencies": { - "@docusaurus/logger": "2.0.0-beta.15", + "@docusaurus/logger": "2.0.0-beta.16", "file-loader": "^6.2.0", "lodash": "^4.17.21", "node-vibrant": "^3.1.6", diff --git a/packages/stylelint-copyright/package.json b/packages/stylelint-copyright/package.json index c82b8d140055..c544069b9a81 100644 --- a/packages/stylelint-copyright/package.json +++ b/packages/stylelint-copyright/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-copyright", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "description": "Stylelint plugin to check CSS files for a copyright header.", "main": "index.js", "license": "MIT", diff --git a/website/package.json b/website/package.json index 41e2859b80ad..f1bc203b4ed2 100644 --- a/website/package.json +++ b/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "2.0.0-beta.15", + "version": "2.0.0-beta.16", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -36,18 +36,18 @@ "dependencies": { "@crowdin/cli": "^3.7.8", "@crowdin/crowdin-api-client": "^1.14.0", - "@docusaurus/core": "2.0.0-beta.15", - "@docusaurus/plugin-client-redirects": "2.0.0-beta.15", - "@docusaurus/plugin-ideal-image": "2.0.0-beta.15", - "@docusaurus/plugin-pwa": "2.0.0-beta.15", - "@docusaurus/preset-classic": "2.0.0-beta.15", - "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.15", - "@docusaurus/logger": "2.0.0-beta.15", - "@docusaurus/theme-classic": "2.0.0-beta.15", - "@docusaurus/theme-common": "2.0.0-beta.15", - "@docusaurus/theme-live-codeblock": "2.0.0-beta.15", - "@docusaurus/utils": "2.0.0-beta.15", - "@docusaurus/utils-common": "2.0.0-beta.15", + "@docusaurus/core": "2.0.0-beta.16", + "@docusaurus/logger": "2.0.0-beta.16", + "@docusaurus/plugin-client-redirects": "2.0.0-beta.16", + "@docusaurus/plugin-ideal-image": "2.0.0-beta.16", + "@docusaurus/plugin-pwa": "2.0.0-beta.16", + "@docusaurus/preset-classic": "2.0.0-beta.16", + "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.16", + "@docusaurus/theme-classic": "2.0.0-beta.16", + "@docusaurus/theme-common": "2.0.0-beta.16", + "@docusaurus/theme-live-codeblock": "2.0.0-beta.16", + "@docusaurus/utils": "2.0.0-beta.16", + "@docusaurus/utils-common": "2.0.0-beta.16", "@popperjs/core": "^2.11.2", "axios": "^0.26.0", "clsx": "^1.1.1", diff --git a/website/versioned_docs/version-2.0.0-beta.14/_partials/swizzleWarning.mdx b/website/versioned_docs/version-2.0.0-beta.14/_partials/swizzleWarning.mdx deleted file mode 100644 index e2aec479dd28..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/_partials/swizzleWarning.mdx +++ /dev/null @@ -1,5 +0,0 @@ -:::caution - -We discourage swizzling of components during the Docusaurus 2 beta phase. The theme components APIs are likely to evolve and have breaking changes. If possible, stick with the default appearance for now. - -::: diff --git a/website/versioned_docs/version-2.0.0-beta.14/advanced/routing.md b/website/versioned_docs/version-2.0.0-beta.14/advanced/routing.md deleted file mode 100644 index 3f39935659c7..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/advanced/routing.md +++ /dev/null @@ -1,17 +0,0 @@ -# Routing - -This page is only accessible through version-switching. It shows how a versioned doc file becomes a webpage. - -```mdx-code-block -import {useLatestVersion, useActiveDocContext} from '@docusaurus/plugin-content-docs/client'; -import {useLocation} from '@docusaurus/router'; - -export const URLPath = () => {useLocation().pathname}; - -export const FilePath = () => { - const currentVersion = useActiveDocContext('default').activeVersion.name; - return {currentVersion === 'current' ? './docs/' : `./versioned_docs/version-${currentVersion}/`}advanced/routing.md; -} -``` - -This page, , is generated from the file at . The component used is `@theme/DocItem`. diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-client-redirects.md b/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-client-redirects.md deleted file mode 100644 index fca62c455542..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-client-redirects.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 4 -id: plugin-client-redirects -title: '📦 plugin-client-redirects' -slug: '/api/plugins/@docusaurus/plugin-client-redirects' ---- - -Docusaurus Plugin to generate **client-side redirects**. - -This plugin will write additional HTML pages to your static site, that redirects the user to your existing Docusaurus pages with JavaScript. - -:::note - -This plugin only create redirects for the production build. - -::: - -:::caution - -It is better to use server-side redirects whenever possible. - -Before using this plugin, you should look if your hosting provider doesn't offer this feature. - -::: - -## Installation {#installation} - -```bash npm2yarn -npm install --save @docusaurus/plugin-client-redirects -``` - -## Configuration {#configuration} - -Main usecase: you have `/myDocusaurusPage`, and you want to redirect to this page from `/myDocusaurusPage.html`: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-client-redirects', - { - fromExtensions: ['html'], - }, - ], - ], -}; -``` - -Second usecase: you have `/myDocusaurusPage.html`, and you want to redirect to this page from `/myDocusaurusPage`. - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-client-redirects', - { - toExtensions: ['html'], - }, - ], - ], -}; -``` - -For custom redirect logic, provide your own `createRedirects` function. - -Let's imagine you change the url of an existing page, you might want to make sure the old url still works: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-client-redirects', - { - redirects: [ - { - to: '/docs/newDocPath', // string - from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'], // string | string[] - }, - ], - }, - ], - ], -}; -``` - -It's possible to use a function to create the redirects for each existing path: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-client-redirects', - { - createRedirects: function (existingPath) { - if (existingPath === '/docs/newDocPath') { - return ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016']; // string | string[] - } - }, - }, - ], - ], -}; -``` - -Finally, it's possible to use all options at the same time: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-client-redirects', - { - fromExtensions: ['html', 'htm'], - toExtensions: ['exe', 'zip'], - redirects: [ - { - to: '/docs/newDocPath', - from: '/docs/oldDocPath', - }, - ], - createRedirects: function (existingPath) { - if (existingPath === '/docs/newDocPath2') { - return ['/docs/oldDocPath2']; - } - }, - }, - ], - ], -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-debug.md b/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-debug.md deleted file mode 100644 index 43f57305b543..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-debug.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -sidebar_position: 5 -id: plugin-debug -title: '📦 plugin-debug' -slug: '/api/plugins/@docusaurus/plugin-debug' ---- - -The debug plugin will display useful debug information at [http://localhost:3000/\_\_docusaurus/debug](http://localhost:3000/__docusaurus/debug). - -It is mostly useful for plugin authors, that will be able to inspect more easily the content of the `.docusaurus` folder (like the creates routes), but also be able to inspect data structures that are never written to disk, like the plugin data loaded through the `contentLoaded` lifecycle. - -:::note - -If you report a bug, we will probably ask you to have this plugin turned on in the production, so that we can inspect your deployment config more easily. - -If you don't have any sensitive information, you can keep it on in production [like we do](http://docusaurus.io/__docusaurus/debug). - -::: - -## Installation {#installation} - -```bash npm2yarn -npm install --save @docusaurus/plugin-debug -``` - -:::tip - -If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. You can also configure it through the [classic preset options](presets.md#docusauruspreset-classic) instead of doing it like below. - -By default, it's enabled in dev, and disabled in prod, to avoid exposing potentially sensitive information. - -::: - -## Configuration {#configuration} - -```js title="docusaurus.config.js" -module.exports = { - plugins: ['@docusaurus/plugin-debug'], -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-analytics.md b/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-analytics.md deleted file mode 100644 index c38a45394b91..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-analytics.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -sidebar_position: 6 -id: plugin-google-analytics -title: '📦 plugin-google-analytics' -slug: '/api/plugins/@docusaurus/plugin-google-analytics' ---- - -The default [Google Analytics](https://developers.google.com/analytics/devguides/collection/analyticsjs/) plugin. It is a JavaScript library for measuring how users interact with your website **in the production build**. If you are using Google Analytics 4 you might need to consider using [plugin-google-gtag](./plugin-google-gtag.md) instead. - -## Installation {#installation} - -```bash npm2yarn -npm install --save @docusaurus/plugin-google-analytics -``` - -:::tip - -If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. - -::: - -## Configuration {#configuration} - -Accepted fields: - - - -| Name | Type | Default | Description | -| --- | --- | --- | --- | -| `trackingID` | `string` | **Required** | The tracking ID of your analytics service. | -| `anonymizeIP` | `boolean` | `false` | Whether the IP should be anonymized when sending requests. | - - - -## Example configuration {#ex-config} - -Here's an example configuration object. - -You can provide it as [preset options](#ex-config-preset) or [plugin options](#ex-config-plugin). - -:::tip - -Most Docusaurus users configure this plugin through the [preset options](#ex-config-preset). - -::: - -```js -const config = { - trackingID: 'UA-141789564-1', - anonymizeIP: true, -}; -``` - -### Preset options {#ex-config-preset} - -If you use a preset, configure this plugin through the [preset options](presets.md#docusauruspreset-classic): - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - // highlight-start - googleAnalytics: { - trackingID: 'UA-141789564-1', - anonymizeIP: true, - }, - // highlight-end - }, - ], - ], -}; -``` - -### Plugin options {#ex-config-plugin} - -If you are using a standalone plugin, provide options directly to the plugin: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-google-analytics', - // highlight-start - { - trackingID: 'UA-141789564-1', - anonymizeIP: true, - }, - // highlight-end - ], - ], -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-gtag.md b/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-gtag.md deleted file mode 100644 index 756dc83fd498..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-google-gtag.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -sidebar_position: 7 -id: plugin-google-gtag -title: '📦 plugin-google-gtag' -slug: '/api/plugins/@docusaurus/plugin-google-gtag' ---- - -The default [Global Site Tag (gtag.js)](https://developers.google.com/analytics/devguides/collection/gtagjs/) plugin. It is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform, **in the production build**. This section describes how to configure a Docusaurus site to enable global site tag for Google Analytics. - -:::tip - -You can use [Google's Tag Assistant](https://tagassistant.google.com/) tool to check if your gtag is set up correctly! - -::: - -## Installation {#installation} - -```bash npm2yarn -npm install --save @docusaurus/plugin-google-gtag -``` - -:::tip - -If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. - -::: - -## Configuration {#configuration} - -Accepted fields: - - - -| Name | Type | Default | Description | -| --- | --- | --- | --- | -| `trackingID` | `string` | **Required** | The tracking ID of your gtag service. | -| `anonymizeIP` | `boolean` | `false` | Whether the IP should be anonymized when sending requests. | - - - -## Example configuration {#ex-config} - -Here's an example configuration object. - -You can provide it as [preset options](#ex-config-preset) or [plugin options](#ex-config-plugin). - -:::tip - -Most Docusaurus users configure this plugin through the [preset options](#ex-config-preset). - -::: - -```js -const config = { - trackingID: 'UA-141789564-1', - anonymizeIP: true, -}; -``` - -### Preset options {#ex-config-preset} - -If you use a preset, configure this plugin through the [preset options](presets.md#docusauruspreset-classic): - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - // highlight-start - gtag: { - trackingID: 'UA-141789564-1', - anonymizeIP: true, - }, - // highlight-end - }, - ], - ], -}; -``` - -### Plugin options {#ex-config-plugin} - -If you are using a standalone plugin, provide options directly to the plugin: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-google-gtag', - // highlight-start - { - trackingID: 'UA-141789564-1', - anonymizeIP: true, - }, - // highlight-end - ], - ], -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-ideal-image.md b/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-ideal-image.md deleted file mode 100644 index 363946e69865..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-ideal-image.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -sidebar_position: 8 -id: plugin-ideal-image -title: '📦 plugin-ideal-image' -slug: '/api/plugins/@docusaurus/plugin-ideal-image' ---- - -Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder) **in the production builds**. - -## Installation {#installation} - -```bash npm2yarn -npm install --save @docusaurus/plugin-ideal-image -``` - -## Configuration {#configuration} - -Modify your `docusaurus.config.js` - -```js {3} -module.exports = { - ... - plugins: ['@docusaurus/plugin-ideal-image'], - ... -} -``` - -## Usage {#usage} - -This plugin supports the PNG and JPG formats only. - -```jsx -import Image from '@theme/IdealImage'; -import thumbnail from './path/to/img.png'; - -// your React code - - -// or - -``` - -## Options {#options} - -| Option | Type | Default | Description | -| --- | --- | --- | --- | -| `name` | `string` | `ideal-img/[name].[hash:hex:7].[width].[ext]` | Filename template for output files. | -| `sizes` | `array` | _original size_ | Specify all widths you want to use. If a specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up). | -| `size` | `integer` | _original size_ | Specify one width you want to use; if the specified size exceeds the original image's width, the latter will be used (i.e. images won't be scaled up) | -| `min` | `integer` | | As an alternative to manually specifying `sizes`, you can specify `min`, `max` and `steps`, and the sizes will be generated for you. | -| `max` | `integer` | | See `min` above | -| `steps` | `integer` | `4` | Configure the number of images generated between `min` and `max` (inclusive) | -| `quality` | `integer` | `85` | JPEG compression quality | diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-sitemap.md b/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-sitemap.md deleted file mode 100644 index 5e61a00b7619..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/api/plugins/plugin-sitemap.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -sidebar_position: 10 -id: plugin-sitemap -title: '📦 plugin-sitemap' -slug: '/api/plugins/@docusaurus/plugin-sitemap' ---- - -This plugin creates sitemap for your site so that search engine crawlers can crawl your site more accurately. - -## Installation {#installation} - -```bash npm2yarn -npm install --save @docusaurus/plugin-sitemap -``` - -:::tip - -If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. You can also configure it through the [classic preset options](presets.md#docusauruspreset-classic) instead of doing it like below. - -::: - -## Configuration {#configuration} - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-sitemap', - { - changefreq: 'weekly', - priority: 0.5, - trailingSlash: false, - }, - ], - ], -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/guides/docs/sidebar.md b/website/versioned_docs/version-2.0.0-beta.14/guides/docs/sidebar.md deleted file mode 100644 index 45149cff0ee1..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/guides/docs/sidebar.md +++ /dev/null @@ -1,1052 +0,0 @@ ---- -id: sidebar -title: Sidebar -toc_max_heading_level: 5 -slug: /sidebar ---- - -```mdx-code-block -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -``` - -Creating a sidebar is useful to: - -- Group multiple **related documents** -- **Display a sidebar** on each of those documents -- Provide a **paginated navigation**, with next/previous button - -To use sidebars on your Docusaurus site: - -1. Define a file that exports a dictionary of [sidebar objects](#sidebar-object). -2. Pass this object into the `@docusaurus/plugin-docs` plugin directly or via `@docusaurus/preset-classic`. - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - // highlight-next-line - sidebarPath: require.resolve('./sidebars.js'), - }, - }, - ], - ], -}; -``` - -## Default sidebar {#default-sidebar} - -If the `sidebarPath` is unspecified, Docusaurus [automatically generates a sidebar](#sidebar-item-autogenerated) for you, by using the filesystem structure of the `docs` folder: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - { - type: 'autogenerated', - dirName: '.', // generate sidebar from the docs folder (or versioned_docs/) - }, - ], -}; -``` - -You can also define your sidebars explicitly. - -## Sidebar object {#sidebar-object} - -A sidebar at its crux is a hierarchy of categories, doc links, and other hyperlinks. - -```typescript -type Sidebar = - // Normal syntax - | SidebarItem[] - // Shorthand syntax - | {[categoryLabel: string]: SidebarItem[]}; -``` - -For example: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - { - type: 'category', - label: 'Getting Started', - items: [ - { - type: 'doc', - id: 'doc1', - }, - ], - }, - { - type: 'category', - label: 'Docusaurus', - items: [ - { - type: 'doc', - id: 'doc2', - }, - { - type: 'doc', - id: 'doc3', - }, - ], - }, - { - type: 'link', - label: 'Learn more', - href: 'https://example.com', - }, - ], -}; -``` - -This is a sidebars file that exports one sidebar, called `mySidebar`. It has three top-level items: two categories and one external link. Within each category, there are a few doc links. - -A sidebars file can contain [**multiple sidebar objects**](#using-multiple-sidebars), identified by their object keys. - -```typescript -type SidebarsFile = { - [sidebarID: string]: Sidebar; -}; -``` - -### Using shorthands {#using-shorthands} - -You can express typical sidebar items without much customization more concisely with **shorthand syntaxes**. There are two parts to this: [**doc shorthand**](#doc-shorthand) and [**category shorthand**](#category-shorthand). - -#### Doc shorthand {#doc-shorthand} - -An item with type `doc` can be simply a string representing its ID: - -```js -// ================= -// This item: -// ================= -{ - type: 'doc', - id: 'myDoc', -}; -// ================= -// Is equivalent to: -// ================= -'myDoc'; -``` - -So it's possible to simplify the example above to: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - { - type: 'category', - label: 'Getting Started', - items: [ - // highlight-next-line - 'doc1', - ], - }, - { - type: 'category', - label: 'Docusaurus', - items: [ - // highlight-start - 'doc2', - 'doc3', - // highlight-end - ], - }, - { - type: 'link', - label: 'Learn more', - href: 'https://example.com', - }, - ], -}; -``` - -#### Category shorthand {#category-shorthand} - -A category item can be represented by an object whose key is its label, and the value is an array of subitems. - -```js -// =================== -// This item: -// =================== -{ - type: 'category', - label: 'Getting started', - items: ['doc1', 'doc2'], -}; -// =================== -// Is equivalent to: -// =================== -{ - 'Getting started': ['doc1', 'doc2'], -}; -``` - -This permits us to simplify that example to: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - // highlight-start - { - 'Getting started': ['doc1'], - }, - { - Docusaurus: ['doc2', 'doc3'], - }, - // highlight-end - { - type: 'link', - label: 'Learn more', - href: 'https://example.com', - }, - ], -}; -``` - -Each shorthand object after this transformation will contain exactly one entry. Now consider the further simplified example below: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - // highlight-start - { - 'Getting started': ['doc1'], - Docusaurus: ['doc2', 'doc3'], - }, - // highlight-end - { - type: 'link', - label: 'Learn more', - href: 'https://example.com', - }, - ], -}; -``` - -Note how the two consecutive category shorthands are compressed into one object with two entries. This syntax generates a **sidebar slice**: you shouldn't see that object as one bulk item—this object is unwrapped, with each entry becoming a separate item, and they spliced together with the rest of the items (in this case, the "Learn more" link) to form the final sidebar level. Sidebar slices are also important when discussing [autogenerated sidebars](#sidebar-item-autogenerated). - -## Understanding sidebar items {#understanding-sidebar-items} - -We have introduced three types of item types in the above example: `doc`, `category`, and `link`, whose usage are fairly intuitive. We will formally introduce their APIs. There's also a fourth type: `autogenerated`, which we will explain in detail later. - -- **[Doc](#sidebar-item-doc)**: link to a doc page, associating it with the sidebar -- **[Link](#sidebar-item-link)**: link to any internal or external page -- **[Category](#sidebar-item-category)**: creates a dropdown of sidebar items -- **[Autogenerated](#sidebar-item-autogenerated)**: generate a sidebar slice automatically -- **[\*Ref](#sidebar-association)**: link to a doc page, without associating it with the sidebar - -### Doc: link to a doc {#sidebar-item-doc} - -Use the `doc` type to link to a doc page and assign that doc to a sidebar: - -```typescript -type SidebarItemDoc = - // Normal syntax - | { - type: 'doc'; - id: string; - label: string; // Sidebar label text - className?: string; // Class name for sidebar label - } - - // Shorthand syntax - | string; // docId shortcut -``` - -Example: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - // Normal syntax: - // highlight-start - { - type: 'doc', - id: 'doc1', // document id - label: 'Getting started', // sidebar label - }, - // highlight-end - - // Shorthand syntax: - // highlight-start - 'doc2', // document id - // highlight-end - ], -}; -``` - -If you use the doc shorthand or [autogenerated](#sidebar-item-autogenerated) sidebar, you would lose the ability to customize the sidebar label through item definition. You can, however, use the `sidebar_label` markdown front matter within that doc, which has a higher precedence over the `label` key in the sidebar item. - -:::note - -A `doc` item sets an [implicit sidebar association](#sidebar-association). Don't assign the same doc to multiple sidebars: change the type to `ref` instead. - -::: - -### Link: link to any page {#sidebar-item-link} - -Use the `link` type to link to any page (internal or external) that is not a doc. - -```typescript -type SidebarItemLink = { - type: 'link'; - label: string; - href: string; - className?: string; -}; -``` - -Example: - -```js title="sidebars.js" -module.exports = { - myLinksSidebar: [ - // highlight-start - // External link - { - type: 'link', - label: 'Facebook', // The link label - href: 'https://facebook.com', // The external URL - }, - // highlight-end - - // highlight-start - // Internal link - { - type: 'link', - label: 'Home', // The link label - href: '/', // The internal path - }, - // highlight-end - ], -}; -``` - -### Category: create a hierarchy {#sidebar-item-category} - -Use the `category` type to create a hierarchy of sidebar items. - -```typescript -type SidebarItemCategory = { - type: 'category'; - label: string; // Sidebar label text. - items: SidebarItem[]; // Array of sidebar items. - className?: string; - - // Category options: - collapsible: boolean; // Set the category to be collapsible - collapsed: boolean; // Set the category to be initially collapsed or open by default - link: SidebarItemCategoryLinkDoc | SidebarItemCategoryLinkGeneratedIndex; -}; -``` - -Example: - -```js title="sidebars.js" -module.exports = { - docs: [ - { - type: 'category', - label: 'Guides', - collapsible: true, - collapsed: false, - items: [ - 'creating-pages', - { - type: 'category', - label: 'Docs', - items: ['introduction', 'sidebar', 'markdown-features', 'versioning'], - }, - ], - }, - ], -}; -``` - -:::tip - -Use the [**shorthand syntax**](#category-shorthand) when you don't need customizations: - -```js title="sidebars.js" -module.exports = { - docs: { - Guides: [ - 'creating-pages', - { - Docs: ['introduction', 'sidebar', 'markdown-features', 'versioning'], - }, - ], - }, -}; -``` - -::: - -#### Category links {#category-link} - -With category links, clicking on a category can navigate you to another page. - -:::tip - -Use category links to introduce a category of documents. - -::: - -##### Doc link {#category-doc-link} - -A category can link to an existing document. - -```js title="sidebars.js" -module.exports = { - docs: [ - { - type: 'category', - label: 'Guides', - // highlight-start - link: {type: 'doc', id: 'introduction'}, - // highlight-end - items: ['pages', 'docs', 'blog', 'search'], - }, - ], -}; -``` - -See it in action in the [i18n introduction page](../../i18n/i18n-introduction.md). - -##### Generated index page {#generated-index-page} - -You can auto-generate an index page that displays all the direct children of this category. The `slug` allows you to customize the generated page's route, which defaults to `/category/[categoryName]`. - -```js title="sidebars.js" -module.exports = { - docs: [ - { - type: 'category', - label: 'Guides', - // highlight-start - link: { - type: 'generated-index', - title: 'Docusaurus Guides', - description: 'Learn about the most important Docusaurus concepts!', - slug: '/category/docusaurus-guides', - }, - // highlight-end - items: ['pages', 'docs', 'blog', 'search'], - }, - ], -}; -``` - -See it in action in the [Docusaurus Guides pages](/docs/category/guides). - -:::tip - -Use `generated-index` links as a quick way to get an introductory document. - -::: - -#### Collapsible categories {#collapsible-categories} - -We support the option to expand/collapse categories. Categories are collapsible by default, but you can disable collapsing with `collapsible: false`. - -```js title="sidebars.js" -module.exports = { - docs: [ - { - type: 'category', - label: 'Guides', - items: [ - 'creating-pages', - { - type: 'category', - // highlight-next-line - collapsible: false, - label: 'Docs', - items: ['introduction', 'sidebar', 'markdown-features', 'versioning'], - }, - ], - }, - ], -}; -``` - -To make all categories non-collapsible by default, set the `sidebarCollapsible` option in `plugin-content-docs` to `false`: - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - // highlight-next-line - sidebarCollapsible: false, - }, - }, - ], - ], -}; -``` - -:::note - -The option in `sidebars.js` takes precedence over plugin configuration, so it is possible to make certain categories collapsible when `sidebarCollapsible` is set to `false` globally. - -::: - -#### Expanded categories by default {#expanded-categories-by-default} - -Collapsible categories are collapsed by default. If you want them to be expanded on first render, you can set `collapsed` to `false`: - -```js title="sidebars.js" -module.exports = { - docs: { - Guides: [ - 'creating-pages', - { - type: 'category', - label: 'Docs', - // highlight-next-line - collapsed: false, - items: ['markdown-features', 'sidebar', 'versioning'], - }, - ], - }, -}; -``` - -Similar to `collapsible`, you can also set the global configuration `options.sidebarCollapsed` to `false`. Individual `collapsed` options in `sidebars.js` will still take precedence over this configuration. - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - // highlight-next-line - sidebarCollapsed: false, - }, - }, - ], - ], -}; -``` - -:::caution - -When a category has `collapsed: true` but `collapsible: false` (either through `sidebars.js` or through plugin configuration), the latter takes precedence and the category is still rendered as expanded. - -::: - -### Autogenerated: generate a sidebar slice {#sidebar-item-autogenerated} - -Docusaurus can **create a sidebar automatically** from your **filesystem structure**: each folder creates a sidebar category, and each file creates a doc link. - -```typescript -type SidebarItemAutogenerated = { - type: 'autogenerated'; - dirName: string; // Source folder to generate the sidebar slice from (relative to docs) -}; -``` - -Docusaurus can generate a full sidebar from your docs folder: - -```js title="sidebars.js" -module.exports = { - myAutogeneratedSidebar: [ - // highlight-start - { - type: 'autogenerated', - dirName: '.', // '.' means the current docs folder - }, - // highlight-end - ], -}; -``` - -An `autogenerated` item is converted by Docusaurus to a **sidebar slice** (also discussed in [category shorthands](#category-shorthand)): a list of items of type `doc` or `category`, so you can splice **multiple `autogenerated` items** from multiple directories, interleaving them with regular sidebar items, in one sidebar level. - -
-A real world example -Consider this file structure: - -```bash -docs -├── api -│ ├── product1-api -│ │ └── api.md -│ └── product2-api -│ ├── basic-api.md -│ └── pro-api.md -├── intro.md -└── tutorials - ├── advanced - │ ├── advanced1.md - │ ├── advanced2.md - │ └── read-more - │ ├── resource1.md - │ └── resource2.md - ├── easy - │ ├── easy1.md - │ └── easy2.md - ├── tutorial-end.md - ├── tutorial-intro.md - └── tutorial-medium.md -``` - -And assume every doc's ID is just its file name. If you define an autogenerated sidebar like this: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - 'intro', - { - type: 'category', - label: 'Tutorials', - items: [ - 'tutorial-intro', - // highlight-start - { - type: 'autogenerated', - dirName: 'tutorials/easy', // Generate sidebar slice from docs/tutorials/easy - }, - // highlight-end - 'tutorial-medium', - // highlight-start - { - type: 'autogenerated', - dirName: 'tutorials/advanced', // Generate sidebar slice from docs/tutorials/hard - }, - // highlight-end - 'tutorial-end', - ], - }, - // highlight-start - { - type: 'autogenerated', - dirName: 'api', // Generate sidebar slice from docs/api - }, - // highlight-end - { - type: 'category', - label: 'Community', - items: ['team', 'chat'], - }, - ], -}; -``` - -It would be resolved as: - -```js title="sidebars.js" -module.exports = { - mySidebar: [ - 'intro', - { - type: 'category', - label: 'Tutorials', - items: [ - 'tutorial-intro', - // highlight-start - // Two files in docs/tutorials/easy - 'easy1', - 'easy2', - // highlight-end - 'tutorial-medium', - // highlight-start - // Two files and a folder in docs/tutorials/hard - 'advanced1', - 'advanced2', - { - type: 'category', - label: 'read-more', - items: ['resource1', 'resource2'], - }, - // highlight-end - 'tutorial-end', - ], - }, - // highlight-start - // Two folders in docs/api - { - type: 'category', - label: 'product1-api', - items: ['api'], - }, - { - type: 'category', - label: 'product2-api', - items: ['basic-api', 'pro-api'], - }, - // highlight-end - { - type: 'category', - label: 'Community', - items: ['team', 'chat'], - }, - ], -}; -``` - -Note how the autogenerate source directories themselves don't become categories: only the items they contain do. This is what we mean by "sidebar slice". - -
- -#### Category index convention {#category-index-convention} - -Docusaurus can automatically link a category to its index document. - -A category index document is a document following one of those filename conventions: - -- Named as `index` (case-insensitive): `docs/Guides/index.md` -- Named as `README` (case-insensitive): `docs/Guides/README.mdx` -- Same name as parent folder: `docs/Guides/Guides.md` - -This is equivalent to using a category with a [doc link](#category-doc-link): - -```js title="sidebars.js" -module.exports = { - docs: [ - // highlight-start - { - type: 'category', - label: 'Guides', - link: {type: 'doc', id: 'Guides/index'}, - items: [], - }, - // highlight-end - ], -}; -``` - -:::tip - -Naming your introductory document `README.md` makes it show up when browsing the folder using the GitHub interface, while using `index.md` makes the behavior more in line with how HTML files are served. - -::: - -#### Autogenerated sidebar metadata {#autogenerated-sidebar-metadata} - -For hand-written sidebar definitions, you would provide metadata to sidebar items through `sidebars.js`; for autogenerated, Docusaurus would read them from the item's respective file. In addition, you may want to adjust the relative position of each item, because by default, items within a sidebar slice will be generated in **alphabetical order** (using files and folders names). - -**For docs**: use additional front matter. The `label` and `className` attributes now become `sidebar_label` and `sidebar_class_name`, while there's an additional `sidebar_position` front matter. - -```yaml title="docs/tutorials/tutorial-easy.md" ---- -# highlight-start -sidebar_position: 2 -sidebar_label: Easy -sidebar_class_name: green -# highlight-end ---- -# Easy Tutorial - -This is the easy tutorial! -``` - -**For categories**: add a `_category_.json` or `_category_.yml` file in the respective folder. You can specify any category metadata and also the `position` metadata. - - - - -```json title="docs/tutorials/_category_.json" -{ - "position": 2.5, - "label": "Tutorial", - "collapsible": true, - "collapsed": false, - "className": "red", - "link": { - "type": "generated-index", - "title": "Tutorial overview" - } -} -``` - - - - -```yaml title="docs/tutorials/_category_.yml" -position: 2.5 # float position is supported -label: 'Tutorial' -collapsible: true # make the category collapsible -collapsed: false # keep the category open by default -className: red -link: - type: generated-index - title: Tutorial overview -``` - - - - -:::info - -If the `link` is explicitly specified, Docusaurus will not apply any [default conventions](#category-index-convention). - -The doc links can be specified relatively, e.g. if the category is generated with the `guides` directory, `"link": {"type": "doc", "id": "intro"}` will be resolved to the ID `guides/intro`, only falling back to `intro` if a doc with the former ID doesn't exist. - -::: - -:::info - -The position metadata is only used **within a sidebar slice**: Docusaurus does not re-order other items of your sidebar. - -::: - -#### Using number prefixes - -A simple way to order an autogenerated sidebar is to prefix docs and folders by number prefixes, which also makes them appear in the file system in the same order when sorted by file name: - -```bash -docs -├── 01-Intro.md -├── 02-Tutorial Easy -│ ├── 01-First Part.md -│ ├── 02-Second Part.md -│ └── 03-End.md -├── 03-Tutorial Hard -│ ├── 01-First Part.md -│ ├── 02-Second Part.md -│ ├── 03-Third Part.md -│ └── 04-End.md -└── 04-End.md -``` - -To make it **easier to adopt**, Docusaurus supports **multiple number prefix patterns**. - -By default, Docusaurus will **remove the number prefix** from the doc id, title, label and URL paths. - -:::caution - -**Prefer using [additional metadata](#autogenerated-sidebar-metadata)**. - -Updating a number prefix can be annoying, as it can require **updating multiple existing markdown links**: - -```diff title="docs/02-Tutorial Easy/01-First Part.md" -- Check the [Tutorial End](../04-End.md); -+ Check the [Tutorial End](../05-End.md); -``` - -::: - -#### Customize the sidebar items generator - -You can provide a custom `sidebarItemsGenerator` function in the docs plugin (or preset) config: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-content-docs', - { - // highlight-start - async sidebarItemsGenerator({ - defaultSidebarItemsGenerator, - numberPrefixParser, - item, - version, - docs, - }) { - // Example: return an hardcoded list of static sidebar items - return [ - {type: 'doc', id: 'doc1'}, - {type: 'doc', id: 'doc2'}, - ]; - }, - // highlight-end - }, - ], - ], -}; -``` - -:::tip - -**Re-use and enhance the default generator** instead of writing a generator from scratch: [the default generator we provide](https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts) is 250 lines long. - -**Add, update, filter, re-order** the sidebar items according to your use-case: - -```js title="docusaurus.config.js" -// highlight-start -// Reverse the sidebar items ordering (including nested category items) -function reverseSidebarItems(items) { - // Reverse items in categories - const result = items.map((item) => { - if (item.type === 'category') { - return {...item, items: reverseSidebarItems(item.items)}; - } - return item; - }); - // Reverse items at current level - result.reverse(); - return result; -} -// highlight-end - -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-content-docs', - { - // highlight-start - async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) { - const sidebarItems = await defaultSidebarItemsGenerator(args); - return reverseSidebarItems(sidebarItems); - }, - // highlight-end - }, - ], - ], -}; -``` - -::: - -## Hideable sidebar {#hideable-sidebar} - -By enabling the `themeConfig.hideableSidebar` option, you can make the entire sidebar hideable, allowing users to better focus on the content. This is especially useful when content is consumed on medium-sized screens (e.g. tablets). - -```js title="docusaurus.config.js" -module.exports = { - themeConfig: { - // highlight-start - hideableSidebar: true, - // highlight-end - }, -}; -``` - -## Using multiple sidebars {#using-multiple-sidebars} - -You can create a sidebar for each **set of Markdown files** that you want to **group together**. - -:::tip - -The Docusaurus site is a good example of using multiple sidebars: - -- [Docs](../../introduction.md) -- [API](../../cli.md) - -::: - -Consider this example: - -```js title="sidebars.js" -module.exports = { - tutorialSidebar: { - 'Category A': ['doc1', 'doc2'], - }, - apiSidebar: ['doc3', 'doc4'], -}; -``` - -When browsing `doc1` or `doc2`, the `tutorialSidebar` will be displayed; when browsing `doc3` or `doc4`, the `apiSidebar` will be displayed. - -### Understanding sidebar association {#sidebar-association} - -Following the example above, if a `commonDoc` is included in both sidebars: - -```js title="sidebars.js" -module.exports = { - tutorialSidebar: { - 'Category A': ['doc1', 'doc2', 'commonDoc'], - }, - apiSidebar: ['doc3', 'doc4', 'commonDoc'], -}; -``` - -How does Docusaurus know which sidebar to display when browsing `commonDoc`? Answer: it doesn't, and we don't guarantee which sidebar it will pick. In this case, in order to remove the ambiguity, you can use the special `ref` sidebar item type. - -The `ref` type is identical to the [`doc` type](#sidebar-item-doc) in every way, except that it doesn't set the association. It only registers itself as a link, but doesn't take part in generating navigation metadata. When [generating pagination](#generating-pagination) and displaying sidebar, `ref` items are completely ignored. - -So you can turn the sidebars above into: - -```js title="sidebars.js" -module.exports = { - tutorialSidebar: { - 'Category A': [ - 'doc1', - 'doc2', - // highlight-next-line - {type: 'ref', id: 'commonDoc'}, - ], - }, - apiSidebar: ['doc3', 'doc4', 'commonDoc'], -}; -``` - -Now, although the link to `commonDoc` is still included in the `tutorialSidebar` sidebar, when browsing `commonDoc`, only `apiSidebar` can be possibly displayed. - -### Generating pagination {#generating-pagination} - -Docusaurus uses the sidebar to generate the "next" and "previous" pagination links at the bottom of each doc page. It strictly uses the sidebar that is displayed: if no sidebar is associated, no pagination is generated either. - -You can customize pagination with front matter `pagination_next` and `pagination_prev`. Consider this sidebar: - -```js title="sidebars.js" -module.exports = { - tutorial: [ - 'introduction', - { - installation: ['windows', 'linux', 'macos'], - }, - 'getting-started', - ], -}; -``` - -The pagination next link on "windows" points to "linux", but that doesn't make sense: you would want readers to proceed to "getting started" after installation. In this case, you can set the pagination manually: - -```yml title="windows.md" ---- -# highlight-next-line -pagination_next: getting-started ---- -# Installation on Windows -``` - -You can also disable displaying a pagination link with `pagination_next: null` or `pagination_prev: null`. - -The pagination label by default is the sidebar label. You can use the front matter `pagination_label` to customize how this doc appears in the pagination. - -## Passing custom props {#passing-custom-props} - -To pass in custom props to a swizzled sidebar item, add the optional `customProps` object to any of the items: - -```js -{ - type: 'doc', - id: 'doc1', - customProps: { - /* props */ - }, -}; -``` - -## Complex sidebars example {#complex-sidebars-example} - -Real-world example from the Docusaurus site: - -```mdx-code-block -import CodeBlock from '@theme/CodeBlock'; - - - {require('!!raw-loader!@site/sidebars.js') - .default - .split('\n') - // remove comments - .map((line) => !['//','/*','*'].some(commentPattern => line.trim().startsWith(commentPattern)) && line) - .filter(Boolean) - .join('\n')} - -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md b/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md deleted file mode 100644 index 67714964f1d4..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -id: versioning -title: Versioning -slug: /versioning ---- - -You can use the version script to create a new documentation version based on the latest content in the `docs` directory. That specific set of documentation will then be preserved and accessible even as the documentation in the `docs` directory changes moving forward. - -:::caution - -Think about it before starting to version your documentation - it can become difficult for contributors to help improve it! - -::: - -Most of the time, you don't need versioning as it will just increase your build time, and introduce complexity to your codebase. Versioning is **best suited for websites with high-traffic and rapid changes to documentation between versions**. If your documentation rarely changes, don't add versioning to your documentation. - -To better understand how versioning works and see if it suits your needs, you can read on below. - -## Directory structure {#directory-structure} - -```shell -website -├── sidebars.json # sidebar for the current docs version -├── docs # docs directory for the current docs version -│ ├── foo -│ │ └── bar.md # https://mysite.com/docs/next/foo/bar -│ └── hello.md # https://mysite.com/docs/next/hello -├── versions.json # file to indicate what versions are available -├── versioned_docs -│ ├── version-1.1.0 -│ │ ├── foo -│ │ │ └── bar.md # https://mysite.com/docs/foo/bar -│ │ └── hello.md -│ └── version-1.0.0 -│ ├── foo -│ │ └── bar.md # https://mysite.com/docs/1.0.0/foo/bar -│ └── hello.md -├── versioned_sidebars -│ ├── version-1.1.0-sidebars.json -│ └── version-1.0.0-sidebars.json -├── docusaurus.config.js -└── package.json -``` - -The table below explains how a versioned file maps to its version and the generated URL. - -| Path | Version | URL | -| --------------------------------------- | -------------- | ----------------- | -| `versioned_docs/version-1.0.0/hello.md` | 1.0.0 | /docs/1.0.0/hello | -| `versioned_docs/version-1.1.0/hello.md` | 1.1.0 (latest) | /docs/hello | -| `docs/hello.md` | current | /docs/next/hello | - -:::tip - -The files in the `docs` directory belong to the `current` docs version. - -By default, the `current` docs version is labelled as `Next` and hosted under `/docs/next/*`, but is entirely configurable to fit your project's release lifecycle. - -::: - -### Tagging a new version {#tagging-a-new-version} - -1. First, make sure the current docs version (the `docs` directory) is ready to be frozen. -1. Enter a new version number. - -```bash npm2yarn -npm run docusaurus docs:version 1.1.0 -``` - -When tagging a new version, the document versioning mechanism will: - -- Copy the full `docs/` folder contents into a new `versioned_docs/version-[versionName]/` folder. -- Create a versioned sidebars file based from your current [sidebar](docs-introduction.md#sidebar) configuration (if it exists) - saved as `versioned_sidebars/version-[versionName]-sidebars.json`. -- Append the new version number to `versions.json`. - -## Docs {#docs} - -### Creating new docs {#creating-new-docs} - -1. Place the new file into the corresponding version folder. -1. Include the reference for the new file into the corresponding sidebar file, according to version number. - -**Current version docs** - -```shell -# The new file. -docs/new.md - -# Edit the corresponding sidebar file. -sidebar.js -``` - -**Older version docs** - -```shell -# The new file. -versioned_docs/version-1.0.0/new.md - -# Edit the corresponding sidebar file. -versioned_sidebars/version-1.0.0-sidebars.json -``` - -### Linking docs {#linking-docs} - -- Remember to include the `.md` extension. -- Files will be linked to correct corresponding version. -- Relative paths work as well. - -```md -The [@hello](hello.md#paginate) document is great! - -See the [Tutorial](../getting-started/tutorial.md) for more info. -``` - -## Versions {#versions} - -Each directory in `versioned_docs/` will represent a documentation version. - -### Updating an existing version {#updating-an-existing-version} - -You can update multiple docs versions at the same time because each directory in `versioned_docs/` represents specific routes when published. - -1. Edit any file. -1. Commit and push changes. -1. It will be published to the version. - -Example: When you change any file in `versioned_docs/version-2.6/`, it will only affect the docs for version `2.6`. - -### Deleting an existing version {#deleting-an-existing-version} - -You can delete/remove versions as well. - -1. Remove the version from `versions.json`. - -Example: - -```diff {4} -[ - "2.0.0", - "1.9.0", -- "1.8.0" -] -``` - -2. Delete the versioned docs directory. Example: `versioned_docs/version-1.8.0`. -3. Delete the versioned sidebars file. Example: `versioned_sidebars/version-1.8.0-sidebars.json`. - -## Recommended practices {#recommended-practices} - -### Figure out the behavior for the "current" version {#figure-out-the-behavior-for-the-current-version} - -The "current" version is the version name for the `./docs` folder. - -There are different ways to manage versioning, but two very common patterns are: - -- You release v1, and start immediately working on v2 (including its docs) -- You release v1, and will maintain it for some time before thinking about v2. - -Docusaurus defaults work great for the first usecase. - -**For the 2nd usecase**: if you release v1 and don't plan to work on v2 anytime soon, instead of versioning v1 and having to maintain the docs in 2 folders (`./docs` + `./versioned_docs/version-1.0.0`), you may consider using the following configuration instead: - -```json -{ - "lastVersion": "current", - "versions": { - "current": { - "label": "1.0.0", - "path": "1.0.0" - } - } -} -``` - -The docs in `./docs` will be served at `/docs/1.0.0` instead of `/docs/next`, and `1.0.0` will become the default version we link to in the navbar dropdown, and you will only need to maintain a single `./docs` folder. - -See [docs plugin configuration](../../api/plugins/plugin-content-docs.md) for more details. - -### Version your documentation only when needed {#version-your-documentation-only-when-needed} - -For example, you are building a documentation for your npm package `foo` and you are currently in version 1.0.0. You then release a patch version for a minor bug fix and it's now 1.0.1. - -Should you cut a new documentation version 1.0.1? **You probably shouldn't**. 1.0.1 and 1.0.0 docs shouldn't differ according to semver because there are no new features!. Cutting a new version for it will only just create unnecessary duplicated files. - -### Keep the number of versions small {#keep-the-number-of-versions-small} - -As a good rule of thumb, try to keep the number of your versions below 10. **It is very likely** that you will have a lot of obsolete versioned documentation that nobody even reads anymore. For example, [Jest](https://jestjs.io/versions) is currently in version `24.9`, and only maintains several latest documentation versions with the lowest being `22.X`. Keep it small 😊 - -### Use absolute import within the docs {#use-absolute-import-within-the-docs} - -Don't use relative paths import within the docs. Because when we cut a version the paths no longer work (the nesting level is different, among other reasons). You can utilize the `@site` alias provided by Docusaurus, that points to the `website` directory. Example: - -```diff -- import Foo from '../src/components/Foo'; -+ import Foo from '@site/src/components/Foo'; -``` - -### Global or versioned collocated assets {#global-or-versioned-collocated-assets} - -You should decide if assets like images and files are per version or shared between versions - -If your assets should be versioned, put them in the docs version, and use relative paths: - -```md -![img alt](./myImage.png) - -[download this file](./file.pdf) -``` - -If your assets are global, put them in `/static` and use absolute paths: - -```md -![img alt](/myImage.png) - -[download this file](/file.pdf) -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-math-equations.mdx b/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-math-equations.mdx deleted file mode 100644 index b37917b4f215..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-math-equations.mdx +++ /dev/null @@ -1,116 +0,0 @@ ---- -id: math-equations -title: Math Equations -description: Writing LaTeX Math Equations -slug: /markdown-features/math-equations ---- - -Mathematical equations can be rendered using [KaTeX](https://katex.org). - -## Usage - -Please read [KaTeX](https://katex.org) documentation for more details. - -### Inline - -Write inline math equations by wrapping LaTeX equations between `$`: - -```mdx -Let $f:[a,b] \to \R$ be Riemann integrable. Let $F:[a,b]\to\R$ be $F(x)= -\int_{a}^{x}f(t)dt$. Then $$F$$ is continuous, and at all $x$ such that $f$ is continuous at $x$, $F$ is differentiable at $x$ with $F'(x)=f(x)$. -``` - -Let $f:[a,b] \to \R$ be Riemann integrable. Let $F:[a,b]\to\R$ be $F(x)= -\int_{a}^{x}f(t)dt$. Then $F$ is continuous, and at all $x$ such that $f$ is continuous at $x$, $F$ is differentiable at $x$ with $F'(x)=f(x)$. - -### Blocks - -For equation block or display mode, use line breaks and `$$`: - -```mdx -$$ -I = \int_0^{2\pi} \sin(x) dx -$$ -``` - -$$ -I = \int_0^{2\pi} \sin(x) dx -$$ - -## Configuration - -To enable KaTeX, you need to install `remark-math` and `rehype-katex` plugins. - -```bash npm2yarn -npm install --save remark-math@3 rehype-katex@4 hast-util-is-element@1.1.0 -``` - -:::caution - -Use the exact same versions. The latest versions are incompatible with Docusaurus 2. - -::: - -Import the plugins in `docusaurus.config.js`: - -```js -const math = require('remark-math'); -const katex = require('rehype-katex'); -``` - -Add them to your content plugin or preset options (usually `@docusaurus/preset-classic` docs options): - -```js -remarkPlugins: [math], -rehypePlugins: [katex], -``` - -Include the KaTeX CSS in your config under `stylesheets`: - -```js -stylesheets: [ - { - href: "https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css", - integrity: "sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc", - crossorigin: "anonymous", - }, -], -``` - -Overall the changes look like: - -```js title="docusaurus.config.js" -// highlight-start -const math = require('remark-math'); -const katex = require('rehype-katex'); -// highlight-end - -module.exports = { - title: 'Docusaurus', - tagline: 'Build optimized websites quickly, focus on your content', - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - path: 'docs', - // highlight-start - remarkPlugins: [math], - rehypePlugins: [katex], - // highlight-end - }, - }, - ], - ], - // highlight-start - stylesheets: [ - { - href: 'https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css', - integrity: - 'sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc', - crossorigin: 'anonymous', - }, - ], - // highlight-end -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-react.mdx b/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-react.mdx deleted file mode 100644 index 8be1ae86fc77..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-react.mdx +++ /dev/null @@ -1,218 +0,0 @@ ---- -id: react -title: MDX and React -description: Using the power of React in Docusaurus Markdown documents, thanks to MDX -slug: /markdown-features/react ---- - -# MDX and React - -```mdx-code-block -import BrowserWindow from '@site/src/components/BrowserWindow'; -``` - -## Using JSX in Markdown {#using-jsx-in-markdown} - -Docusaurus has built-in support for [MDX v1](https://mdxjs.com/), which allows you to write JSX within your Markdown files and render them as React components. - -:::note - -While both `.md` and `.mdx` files are parsed using MDX, some of the syntax are treated slightly differently. For the most accurate parsing and better editor support, we recommend using the `.mdx` extension for files containing MDX syntax. - -::: - -:::caution - -MDX is not [100% compatible with CommonMark](https://github.com/facebook/docusaurus/issues/3018). - -Use the **[MDX playground](https://mdx-git-renovate-babel-monorepo-mdx.vercel.app/playground)** to ensure that your syntax is valid MDX. - -::: - -Try this block here: - -```jsx -export const Highlight = ({children, color}) => ( - - {children} - -); - -Docusaurus green and Facebook blue are my favorite colors. - -I can write **Markdown** alongside my _JSX_! -``` - -Notice how it renders both the markup from your React component and the Markdown syntax: - -```mdx-code-block -export const Highlight = ({children, color}) => ( - - {children} - -); - - - -Docusaurus green -{` `}and Facebook blue are my favorite colors. - -I can write **Markdown** alongside my _JSX_! - - -``` - -
- -You can also import your own components defined in other files or third-party components installed via npm! Check out the [MDX docs](https://mdxjs.com/) to see what other fancy stuff you can do with MDX. - -:::caution - -Since all doc files are parsed using MDX, any HTML is treated as JSX. Therefore, if you need to inline-style a component, follow JSX flavor and provide style objects. This behavior is different from Docusaurus 1. See also [Migrating from v1 to v2](../../migration/migration-manual.md#convert-style-attributes-to-style-objects-in-mdx). - -::: - -## Importing code snippets {#importing-code-snippets} - -You can not only import a file containing a component definition, but also import any code file as raw text, and then insert it in a code block, thanks to [Webpack raw-loader](https://webpack.js.org/loaders/raw-loader/). In order to use `raw-loader`, first you need to install it in your project: - -```bash npm2yarn -npm install --save raw-loader -``` - -Now you can import code snippets from another file as it is: - - -```jsx title="myMarkdownFile.mdx" -import CodeBlock from '@theme/CodeBlock'; -import MyComponentSource from '!!raw-loader!./myComponent'; - -{MyComponentSource} -``` - - -```mdx-code-block -import CodeBlock from '@theme/CodeBlock'; -import MyComponentSource from '!!raw-loader!@site/src/pages/examples/_myComponent'; - - - -{MyComponentSource} - - - -
-``` - -You can also pass `title` prop to `CodeBlock` component in order to appear it as header above your codeblock: - -```jsx - - {MyComponentSource} - -``` - -:::note - -You have to use `` rather than the Markdown triple-backtick ` ``` `, because the latter will ship out any of its content as-is, but you want JSX to insert the imported text here. - -::: - -:::warning - -This feature is experimental and might be subject to API breaking changes in the future. - -::: - -## Importing Markdown {#importing-markdown} - -You can use Markdown files as components and import them elsewhere, either in Markdown files or in React pages. - -By convention, using the **`_` filename prefix** will not create any doc page and means the markdown file is a **"partial"**, to be imported by other files. - -```md title="_markdown-partial-example.mdx" -Hello {props.name} - -This is text some content from `_markdown-partial-example.mdx`. -``` - -```jsx title="someOtherDoc.mdx" -import PartialExample from './_markdown-partial-example.mdx'; - -; -``` - -```mdx-code-block -import PartialExample from './_markdown-partial-example.mdx'; - - - - - -
-``` - -This way, you can reuse contents among multiple pages and avoid duplicating materials. - -:::caution - -The table-of-contents does not currently contain the imported Markdown headings. This is a technical limitation that we are trying to solve ([issue](https://github.com/facebook/docusaurus/issues/3915)). - -::: - -## Available exports - -Within the MDX page, the following variables are available as globals: - -- `frontMatter`: the front matter as a record of string keys and values; -- `toc`: the table of contents, as a tree of headings. See also [Inline TOC](./markdown-features-inline-toc.mdx) for a more concrete use-case. -- `contentTitle`: the Markdown title, which is the first `h1` heading in the Markdown text. It's `undefined` if there isn't one (e.g. title specified in the front matter). - -```jsx -import TOCInline from '@theme/TOCInline'; -import CodeBlock from '@theme/CodeBlock'; - -The table of contents for this page, serialized: - -{JSON.stringify(toc, null, 2)} - -The front matter of this page: - -
    - {Object.entries(frontMatter).map(([key, value]) =>
  • {key}: {value}
  • )} -
- -

The title of this page is: {contentTitle}

-``` - -```mdx-code-block -import TOCInline from '@theme/TOCInline'; - - - -The table of contents for this page, serialized: - -{JSON.stringify(toc, null, 2)} - -The front matter of this page: - -
    - {Object.entries(frontMatter).map(([key, value]) =>
  • {key}: {value}
  • )} -
- -

The title of this page is: {contentTitle}

- -
-``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/i18n/i18n-tutorial.md b/website/versioned_docs/version-2.0.0-beta.14/i18n/i18n-tutorial.md deleted file mode 100644 index 4e4ce73ebd25..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/i18n/i18n-tutorial.md +++ /dev/null @@ -1,336 +0,0 @@ ---- -id: tutorial -title: i18n - Tutorial -slug: /i18n/tutorial ---- - -This tutorial will walk you through the basis of the **Docusaurus i18n system**. - -We will add **French** translations to a **newly initialized English Docusaurus website**. - -Initialize a new site with `npx create-docusaurus@latest website classic` (like [this one](https://github.com/facebook/docusaurus/tree/main/examples/classic)). - -## Configure your site {#configure-your-site} - -Modify `docusaurus.config.js` to add the i18n support for the French language. - -### Site configuration {#site-configuration} - -Use the [site i18n configuration](./../api/docusaurus.config.js.md#i18n) to declare the i18n locales: - -```js title="docusaurus.config.js" -module.exports = { - i18n: { - defaultLocale: 'en', - locales: ['en', 'fr'], - }, -}; -``` - -### Theme configuration {#theme-configuration} - -Add a **navbar item** of type `localeDropdown` so that users can select the locale they want: - -```js title="docusaurus.config.js" -module.exports = { - themeConfig: { - navbar: { - items: [ - // highlight-start - { - type: 'localeDropdown', - position: 'left', - }, - // highlight-end - ], - }, - }, -}; -``` - -### Start your site {#start-your-site} - -Start your localized site in dev mode, using the locale of your choice: - -```bash npm2yarn -npm run start -- --locale fr -``` - -Your site is accessible at **`http://localhost:3000/fr/`**. - -We haven't provided any translation, and the site is **mostly untranslated**. - -:::tip - -Docusaurus provides **default translations** for generic theme labels, such as "Next" and "Previous" for the pagination. - -Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-translations/locales)**. - -::: - -:::caution - -Each locale is a **distinct standalone single-page-application**: it is not possible to start the Docusaurus sites in all locales at the same time. - -::: - -## Translate your site {#translate-your-site} - -The French translations will be added in `website/i18n/fr`. - -Docusaurus is modular, and each content plugin has its own subfolder. - -:::note - -After copying files around, restart your site with `npm run start -- --locale fr`. - -Hot-reload will work better when editing existing files. - -::: - -### Use the translation APIs {#use-the-translation-apis} - -Open the homepage, and use the [translation APIs](../docusaurus-core.md#translate): - -```jsx title="src/pages/index.js" -import React from 'react'; -import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; - -// highlight-start -import Translate, {translate} from '@docusaurus/Translate'; -// highlight-end - -export default function Home() { - return ( - -

- {/* highlight-start */} - Welcome to my website - {/* highlight-end */} -

-
- {/* highlight-start */} - blog}}> - {'You can also visit my {blog}'} - - {/* highlight-end */} - - -
-
- ); -} -``` - -:::caution - -Docusaurus provides a **very small and lightweight translation runtime** on purpose, and only supports basic [placeholders interpolation](../docusaurus-core.md#interpolate), using a subset of the [ICU Message Format](https://formatjs.io/docs/core-concepts/icu-syntax/). - -Most documentation websites are generally **static** and don't need advanced i18n features (**plurals**, **genders**, etc.). Use a library like [react-intl](https://www.npmjs.com/package/react-intl) for more advanced use-cases. - -::: - -### Translate JSON files {#translate-json-files} - -JSON translation files are used for everything that is not contained in a Markdown document: - -- React/JSX code -- Layout navbar and footer labels -- Docs sidebar category labels -- ... - -Run the [write-translations](../cli.md#docusaurus-write-translations-sitedir) command: - -```bash npm2yarn -npm run write-translations -- --locale fr -``` - -It will extract and initialize the JSON translation files that you need to translate. - -The homepage translations are statically extracted from React source code: - -```json title="i18n/fr/code.json" -{ - "Welcome to my website": { - "message": "Welcome to my website", - "description": "The homepage welcome message" - }, - "Hello": { - "message": "Hello", - "description": "The homepage input placeholder" - } -} -``` - -Plugins and themes will also write their own **JSON translation files**, such as: - -```json title="i18n/fr/docusaurus-theme-classic/navbar.json" -{ - "title": { - "message": "My Site", - "description": "The title in the navbar" - }, - "item.label.Docs": { - "message": "Docs", - "description": "Navbar item with label Docs" - }, - "item.label.Blog": { - "message": "Blog", - "description": "Navbar item with label Blog" - }, - "item.label.GitHub": { - "message": "GitHub", - "description": "Navbar item with label GitHub" - } -} -``` - -Translate the `message` attribute in the JSON files of `i18n/fr`, and your site layout and homepage should now be translated. - -### Translate Markdown files {#translate-markdown-files} - -Official Docusaurus content plugins extensively use Markdown/MDX files, and allow you to translate them. - -#### Translate the docs {#translate-the-docs} - -Copy your docs Markdown files to `i18n/fr/docusaurus-plugin-content-docs/current`, and translate them: - -```bash -mkdir -p i18n/fr/docusaurus-plugin-content-docs/current -cp -r docs/** i18n/fr/docusaurus-plugin-content-docs/current -``` - -:::info - -`current` is needed for the docs versioning feature: each docs version has its own subfolder. - -::: - -#### Translate the blog {#translate-the-blog} - -Copy your blog Markdown files to `i18n/fr/docusaurus-plugin-content-blog`, and translate them: - -```bash -mkdir -p i18n/fr/docusaurus-plugin-content-blog -cp -r blog/** i18n/fr/docusaurus-plugin-content-blog -``` - -#### Translate the pages {#translate-the-pages} - -Copy your pages Markdown files to `i18n/fr/docusaurus-plugin-content-pages`, and translate them: - -```bash -mkdir -p i18n/fr/docusaurus-plugin-content-pages -cp -r src/pages/**.md i18n/fr/docusaurus-plugin-content-pages -cp -r src/pages/**.mdx i18n/fr/docusaurus-plugin-content-pages -``` - -:::caution - -We only copy `.md` and `.mdx` files, as pages React components are translated through JSON translation files already. - -::: - -### Use explicit heading ids {#use-explicit-heading-ids} - -By default, a Markdown heading `### Hello World` will have a generated id `hello-world`. - -Other documents can target it with `[link](#hello-world)`. - -The translated heading becomes `### Bonjour le Monde`, with id `bonjour-le-monde`. - -Generated ids are not always a good fit for localized sites, as it requires you to localize all the anchor links: - -```diff -- [link](#hello-world). -+ [link](#bonjour-le-monde) -``` - -:::tip - -For localized sites, it is recommended to use **[explicit heading ids](../guides/markdown-features/markdown-features-headings.mdx#explicit-ids)**. - -::: - -## Deploy your site {#deploy-your-site} - -You can choose to deploy your site under a **single domain**, or use **multiple (sub)domains**. - -### Single-domain deployment {#single-domain-deployment} - -Run the following command: - -```bash npm2yarn -npm run build -``` - -Docusaurus will build **one single-page application per locale**: - -- `website/build`: for the default, English language -- `website/build/fr`: for the French language - -You can now [deploy](../deployment.mdx) the `build` folder to the static hosting solution of your choice. - -:::note - -The Docusaurus v2 website use this strategy: - -- [https://docusaurus.io](https://docusaurus.io) -- [https://docusaurus.io/fr](https://docusaurus.io/fr) - -::: - -:::tip - -Static hosting providers generally redirect `/unknown/urls` to `/404.html` by convention, always showing an **English 404 page**. - -**Localize your 404 pages** by configuring your host to redirect `/fr/*` to `/fr/404.html`. - -This is not always possible, and depends on your host: GitHub Pages can't do this, [Netlify](https://docs.netlify.com/routing/redirects/redirect-options/#custom-404-page-handling) can. - -::: - -### Multi-domain deployment {#multi-domain-deployment} - -You can also build your site for a single locale: - -```bash npm2yarn -npm run build -- --locale fr -``` - -Docusaurus will not add the `/fr/` URL prefix. - -On your [static hosting provider](../deployment.mdx): - -- create one deployment per locale -- configure the appropriate build command, using the `--locale` option -- configure the (sub)domain of your choice for each deployment - -:::caution - -This strategy is **not possible** with Github Pages, as it is only possible to **have a single deployment**. - -::: - -### Hybrid {#hybrid} - -It is possible to have some locales using sub-paths, and others using subdomains. - -It is also possible to deploy each locale as a separate subdomain, assemble the subdomains in a single unified domain at the CDN level: - -- Deploy your site as `fr.docusaurus.io` -- Configure a CDN to serve it from `docusaurus.io/fr` diff --git a/website/versioned_docs/version-2.0.0-beta.14/presets.md b/website/versioned_docs/version-2.0.0-beta.14/presets.md deleted file mode 100644 index e359ca404b49..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/presets.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -id: presets -title: Presets ---- - -Presets are collections of plugins and themes. - -## Using presets {#using-presets} - -A preset is usually a npm package, so you install them like other npm packages using npm. - -```bash npm2yarn -npm install --save @docusaurus/preset-classic -``` - -Then, add it in your site's `docusaurus.config.js`'s `presets` option: - -```jsx {3} title="docusaurus.config.js" -module.exports = { - // ... - presets: ['@docusaurus/preset-classic'], -}; -``` - -To load presets from your local directory, specify how to resolve them: - -```jsx {5} title="docusaurus.config.js" -const path = require('path'); - -module.exports = { - // ... - presets: [path.resolve(__dirname, '/path/to/docusaurus-local-presets')], -}; -``` - -## Presets -> themes and plugins {#presets---themes-and-plugins} - -Presets are a shorthand function to add plugins and themes to your Docusaurus config. For example, you can specify a preset that includes the following themes and plugins, - -```js -module.exports = function preset(context, opts = {}) { - return { - themes: ['@docusaurus/theme-cool', opts.cool], - plugins: ['@docusaurus/plugin-blog', opts.blog], - }; -}; -``` - -then in your Docusaurus config, you may configure the preset instead: - -```jsx {3} title="docusaurus.config.js" -module.exports = { - presets: [ - '@docusaurus/preset-my-own', - {cool: {hello: 'world'}, blog: {path: '/blog'}}, - ], -}; -``` - -This is equivalent of doing: - -```jsx title="docusaurus.config.js" -module.exports = { - themes: ['@docusaurus/themes-cool', {hello: 'world'}], - plugins: ['@docusaurus/plugin-blog', {path: '/blog'}], -}; -``` - -This is especially useful when some plugins and themes are intended to be used together. - -## Official presets {#official-presets} - -### `@docusaurus/preset-classic` {#docusauruspreset-classic} - -The classic preset that is usually shipped by default to new Docusaurus website. It is a set of plugins and themes. - -| Themes | Plugins | -| --- | --- | -| [`@docusaurus/theme-classic`](./api/themes/theme-configuration.md) | [`@docusaurus/plugin-content-docs`](./api/plugins/plugin-content-docs.md) | -| [`@docusaurus/theme-search-algolia`](./api/themes/theme-search-algolia.md) | [`@docusaurus/plugin-content-blog`](./api/plugins/plugin-content-blog.md) | -| | [`@docusaurus/plugin-content-pages`](./api/plugins/plugin-content-pages.md) | -| | [`@docusaurus/plugin-debug`](./api/plugins/plugin-debug.md) | -| | [`@docusaurus/plugin-google-analytics`](./api/plugins/plugin-google-analytics.md) | -| | [`@docusaurus/plugin-google-gtag`](./api/plugins/plugin-google-gtag.md) | -| | [`@docusaurus/plugin-sitemap`](./api/plugins/plugin-sitemap.md) | - -To specify plugin options individually, you can provide the necessary fields to certain plugins, i.e. `customCss` for `@docusaurus/theme-classic`, pass them in the preset field, like this: - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - // Debug defaults to true in dev, false in prod - debug: undefined, - // Will be passed to @docusaurus/theme-classic. - theme: { - customCss: [require.resolve('./src/css/custom.css')], - }, - // Will be passed to @docusaurus/plugin-content-docs (false to disable) - docs: {}, - // Will be passed to @docusaurus/plugin-content-blog (false to disable) - blog: {}, - // Will be passed to @docusaurus/plugin-content-pages (false to disable) - pages: {}, - // Will be passed to @docusaurus/plugin-content-sitemap (false to disable) - sitemap: {}, - // Will be passed to @docusaurus/plugin-google-gtag (only enabled when explicitly specified) - gtag: {}, - // Will be passed to @docusaurus/plugin-google-analytics (only enabled when explicitly specified) - googleAnalytics: {}, - }, - ], - ], -}; -``` - -In addition to these plugins and themes, `@docusaurus/theme-classic` adds [`remark-admonitions`](https://github.com/elviswolcott/remark-admonitions) as a remark plugin to `@docusaurus/plugin-content-blog` and `@docusaurus/plugin-content-docs`. - -The `admonitions` key will be passed as the [options](https://github.com/elviswolcott/remark-admonitions#options) to `remark-admonitions`. Passing `false` will prevent the plugin from being added to MDX. - -```js title="docusaurus.config.js" -module.exports = { - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - // options for remark-admonitions - admonitions: {}, - }, - }, - ], - ], -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/static-assets.md b/website/versioned_docs/version-2.0.0-beta.14/static-assets.md deleted file mode 100644 index b37f1c6b137f..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/static-assets.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: static-assets -title: Static Assets ---- - -Every website needs assets: images, stylesheets, favicons etc. By default, you are suggested to put these assets in the `static` folder. - -Every file you put into **that directory will be copied** into the root of the generated `build` folder with the directory hierarchy preserved. E.g. if you add a file named `sun.jpg` to the static folder, it will be copied to `build/sun.jpg`. - -This means that: - -- for site `baseUrl: '/'`, the image `/static/img/docusaurus.png` will be served at `/img/docusaurus.png`. -- for site `baseUrl: '/subpath/'`, the image `/static/img/docusaurus.png` will be served at `/subpath/img/docusaurus.png`. - -You can customize the static directory sources in `docusaurus.config.js`. For example, we can add `public` as another possible path: - -```js title="docusaurus.config.js" -module.exports = { - title: 'My site', - staticDirectories: ['public', 'static'], - // ... -}; -``` - -Now, all files in `public` as well as `static` will be copied to the build output. - -## Referencing your static asset {#referencing-your-static-asset} - -In JSX, you can reference assets from the `static` folder in your code using absolute paths, but this is not ideal because changing the site `baseUrl` will **break those links**. For the image `` served at `https://example.com/test`, the browser will try to resolve it from the URL root, i.e. as `https://example.com/img/docusaurus.png`, which will fail because it's actually served at `https://example.com/test/img/docusaurus.png`. - -You can `import` / `require()` the static asset (recommended), or use the `useBaseUrl` utility function: both prepend the `baseUrl` to paths for you. - -:::info - -In Markdown, things are different: you can stick to use absolute paths because Docusaurus actually handles them as `require` calls instead of URLs when parsing the Markdown. See [Markdown static assets](./guides/markdown-features/markdown-features-assets.mdx). - -::: - -### Examples {#examples} - -```jsx title="MyComponent.js" -import DocusaurusImageUrl from '@site/static/img/docusaurus.png'; - -; -``` - -```jsx title="MyComponent.js" - -``` - -```jsx title="MyComponent.js" -import useBaseUrl from '@docusaurus/useBaseUrl'; - -; -``` - -You can also import SVG files: they will be transformed into React components. - -```jsx title="MyComponent.js" -import DocusaurusLogoWithKeytar from '@site/static/img/docusaurus_keytar.svg'; - -; -``` - -### Caveats {#caveats} - -Keep in mind that: - -- By default, none of the files in `static` folder will be post-processed, hashed or minified. -- Missing files referenced via hardcoded absolute paths will not be detected at compilation time, and will result in a 404 error. -- By default, GitHub Pages runs published files through [Jekyll](https://jekyllrb.com/). Since Jekyll will discard any files that begin with `_`, it is recommended that you disable Jekyll by adding an empty file named `.nojekyll` file to your `static` directory if you are using GitHub pages for hosting. diff --git a/website/versioned_docs/version-2.0.0-beta.14/using-plugins.md b/website/versioned_docs/version-2.0.0-beta.14/using-plugins.md deleted file mode 100644 index 5961d24a02ec..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/using-plugins.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -id: using-plugins -title: Plugins ---- - -Plugins are the building blocks of features in a Docusaurus 2 site. Each plugin handles its own individual feature. Plugins may work and be distributed as part of bundle via [presets](presets.md). - -## Available plugins {#available-plugins} - -We maintain a [list of official plugins](./api/plugins/overview.md), but the community has also created some [unofficial plugins](/community/resources#community-plugins). - -## Installing a plugin {#installing-a-plugin} - -A plugin is usually a npm package, so you install them like other npm packages using npm. - -```bash npm2yarn -npm install --save docusaurus-plugin-name -``` - -Then you add it in your site's `docusaurus.config.js`'s `plugins` option: - -```jsx {3} title="docusaurus.config.js" -module.exports = { - // ... - plugins: ['@docusaurus/plugin-content-pages'], -}; -``` - -Docusaurus can also load plugins from your local directory, you can do something like the following: - -```jsx {5} title="docusaurus.config.js" -const path = require('path'); - -module.exports = { - // ... - plugins: [path.resolve(__dirname, '/path/to/docusaurus-local-plugin')], -}; -``` - -## Configuring plugins {#configuring-plugins} - -For the most basic usage of plugins, you can provide just the plugin name or the absolute path to the plugin. - -However, plugins can have options specified by wrapping the name and an options object in an array inside your config. This style is usually called `Babel Style`. - -```js {4-9} title="docusaurus.config.js" -module.exports = { - // ... - plugins: [ - [ - '@docusaurus/plugin-xxx', - { - /* options */ - }, - ], - ], -}; -``` - -Example: - -```js title="docusaurus.config.js" -module.exports = { - plugins: [ - // Basic usage. - '@docusaurus/plugin-google-analytics', - - // With options object (babel style) - [ - '@docusaurus/plugin-sitemap', - { - changefreq: 'weekly', - }, - ], - ], -}; -``` - -## Multi-instance plugins and plugin ids {#multi-instance-plugins-and-plugin-ids} - -All Docusaurus content plugins can support multiple plugin instances. - -The Docs plugin has [additional multi-instance documentation](./guides/docs/docs-multi-instance.mdx) - -It is required to assign a unique id to each plugin instance. - -By default, the plugin id is `default`. - -```js {6,13} title="docusaurus.config.js" -module.exports = { - plugins: [ - [ - '@docusaurus/plugin-xxx', - { - id: 'plugin-xxx-1', - // other options - }, - ], - [ - '@docusaurus/plugin-xxx', - { - id: 'plugin-xxx-2', - // other options - }, - ], - ], -}; -``` - -:::note - -At most one plugin instance can be the "default plugin instance", by omitting the `id` attribute, or using `id: 'default'`. - -::: - -## Plugins design {#plugins-design} - -Docusaurus' implementation of the plugins system provides us with a convenient way to hook into the website's lifecycle to modify what goes on during development/build, which involves (but not limited to) extending the webpack config, modifying the data being loaded and creating new components to be used in a page. - -## Creating plugins {#creating-plugins} - -A plugin is a function that takes two parameters: `context` and `options`. It returns a plugin instance object. You can create plugins as functions or modules. For more information, refer to the [plugin method references section](./api/plugin-methods/README.md). - -### Functional definition {#functional-definition} - -You can use a plugin as a function directly included in the Docusaurus config file: - -```js title="docusaurus.config.js" -module.exports = { - // ... - plugins: [ - // highlight-start - function myPlugin(context, options) { - // ... - return { - name: 'my-plugin', - async loadContent() { - // ... - }, - async contentLoaded({content, actions}) { - // ... - }, - /* other lifecycle API */ - }; - }, - // highlight-end - ], -}; -``` - -### Module definition {#module-definition} - -You can use a plugin as a module path referencing a separate file or NPM package: - -```js title="docusaurus.config.js" -module.exports = { - // ... - plugins: [ - // without options: - './my-plugin', - // or with options: - ['./my-plugin', options], - ], -}; -``` - -Then in the folder `my-plugin` you can create an index.js such as this: - -```js title="my-plugin.js" -module.exports = function myPlugin(context, options) { - // ... - return { - name: 'my-plugin', - async loadContent() { - /* ... */ - }, - async contentLoaded({content, actions}) { - /* ... */ - }, - /* other lifecycle API */ - }; -}; -``` diff --git a/website/versioned_docs/version-2.0.0-beta.14/using-themes.md b/website/versioned_docs/version-2.0.0-beta.14/using-themes.md deleted file mode 100644 index c2be7d8f41f6..000000000000 --- a/website/versioned_docs/version-2.0.0-beta.14/using-themes.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -id: using-themes -title: Themes ---- - -Like plugins, themes are designed to add functionality to your Docusaurus site. As a good rule of thumb, themes are mostly focused on client-side, where plugins are more focused on server-side functionalities. Themes are also designed to be replace-able with other themes. - -**Themes are for providing UI components to present the content.** Most content plugins need to be paired with a theme in order to be actually useful. The UI is a separate layer from the data schema, which makes swapping designs easy. - -For example, a Docusaurus blog consists of a blog plugin and a blog theme. - -:::note - -This is a contrived example: in practice, `@docusaurus/theme-classic` provides the theme for docs, blog, and layouts. - -::: - -```js title="docusaurus.config.js" -module.exports = { - themes: ['theme-blog'], - plugins: ['plugin-content-blog'], -}; -``` - -And if you want to use Bootstrap styling, you can swap out the theme with `theme-blog-bootstrap` (another fictitious non-existing theme): - -```js title="docusaurus.config.js" -module.exports = { - themes: ['theme-blog-bootstrap'], - plugins: ['plugin-content-blog'], -}; -``` - -## Available themes {#available-themes} - -We maintain a [list of official themes](./api/themes/overview.md). - -## Using themes {#using-themes} - -To use themes, specify the themes in your `docusaurus.config.js`. You may use multiple themes: - -```js {3} title="docusaurus.config.js" -module.exports = { - // ... - themes: ['@docusaurus/theme-classic', '@docusaurus/theme-live-codeblock'], -}; -``` - -## Theme components {#theme-components} - -Most of the time, theme is used to provide a set of React components, e.g. `Navbar`, `Layout`, `Footer`. - -Users can use these components in their code by importing them using the `@theme` webpack alias: - -```js -import Navbar from '@theme/Navbar'; -``` - -The alias `@theme` can refer to a few directories, in the following priority: - -1. A user's `website/src/theme` directory, which is a special directory that has the higher precedence. -2. A Docusaurus theme packages's `theme` directory. -3. Fallback components provided by Docusaurus core (usually not needed). - -## Swizzling theme components {#swizzling-theme-components} - -```mdx-code-block -import SwizzleWarning from "./_partials/swizzleWarning.mdx" - - -``` - -Docusaurus Themes' components are designed to be replaceable. To make it easier for you, we created a command for you to replace theme components called `swizzle`. Given the following structure: - -``` -website -├── node_modules -│ └── docusaurus-theme -│ └── theme -│ └── Navbar.js -└── src - └── theme - └── Navbar.js -``` - -`website/src/theme/Navbar.js` takes precedence whenever `@theme/Navbar` is imported. This behavior is called component swizzling. In iOS, method swizzling is the process of changing the implementation of an existing selector (method). In the context of a website, component swizzling means providing an alternative component that takes precedence over the component provided by the theme. - -To swizzle a component for a theme, run the following command in your doc site: - -```bash npm2yarn -npm run swizzle [component name] -``` - -As an example, to swizzle the `