diff --git a/CHANGELOG.md b/CHANGELOG.md index 934450af03..3d4de531a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Docusaurus 2 Changelog +#### :nail_care: Polish + +- `docusaurus` + - [#7781](https://github.com/facebook/docusaurus/pull/7781) refactor(core): log Docusaurus & Node version before exiting ([@Josh-Cena](https://github.com/Josh-Cena)) + +#### Committers: 2 + +- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena)) +- Sébastien Lorber ([@slorber](https://github.com/slorber)) + ## 2.0.0-rc.1 (2022-07-14) #### :bug: Bug Fix diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f65f4fdd76..56f4fa2a73 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -23,6 +23,8 @@ const ArchivedVersionsDropdownItems = Object.entries(VersionsArchived).splice( // This probably only makes sense for the alpha/beta/rc phase, temporary function getNextVersionName() { + return 'Canary'; + /* const expectedPrefix = '2.0.0-rc.'; const lastReleasedVersion = versions[0]; @@ -33,6 +35,8 @@ function getNextVersionName() { } const version = parseInt(lastReleasedVersion.replace(expectedPrefix, ''), 10); return `${expectedPrefix}${version + 1}`; + + */ } const allDocHomesPaths = [ diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-classic.md b/website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-classic.md deleted file mode 100644 index 900f69cfa1..0000000000 --- a/website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-classic.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -sidebar_position: 2 -slug: /api/themes/@docusaurus/theme-classic ---- - -# 📦 theme-classic - -The classic theme for Docusaurus. - -You can refer to the [theme configuration page](theme-configuration.md) for more details on the configuration. - -```bash npm2yarn -npm install --save @docusaurus/theme-classic -``` - -:::tip - -If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. - -::: diff --git a/website/versioned_docs/version-2.0.0-beta.22/advanced/architecture.md b/website/versioned_docs/version-2.0.0/advanced/architecture.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/advanced/architecture.md rename to website/versioned_docs/version-2.0.0/advanced/architecture.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/advanced/client.md b/website/versioned_docs/version-2.0.0/advanced/client.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/advanced/client.md rename to website/versioned_docs/version-2.0.0/advanced/client.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/advanced/index.md b/website/versioned_docs/version-2.0.0/advanced/index.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/advanced/index.md rename to website/versioned_docs/version-2.0.0/advanced/index.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/advanced/plugins.md b/website/versioned_docs/version-2.0.0/advanced/plugins.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/advanced/plugins.md rename to website/versioned_docs/version-2.0.0/advanced/plugins.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/advanced/routing.md b/website/versioned_docs/version-2.0.0/advanced/routing.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/advanced/routing.md rename to website/versioned_docs/version-2.0.0/advanced/routing.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/advanced/ssg.md b/website/versioned_docs/version-2.0.0/advanced/ssg.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/advanced/ssg.md rename to website/versioned_docs/version-2.0.0/advanced/ssg.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/docusaurus.config.js.md b/website/versioned_docs/version-2.0.0/api/docusaurus.config.js.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/docusaurus.config.js.md rename to website/versioned_docs/version-2.0.0/api/docusaurus.config.js.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/_category_.yml b/website/versioned_docs/version-2.0.0/api/misc/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/_category_.yml rename to website/versioned_docs/version-2.0.0/api/misc/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/create-docusaurus.md b/website/versioned_docs/version-2.0.0/api/misc/create-docusaurus.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/create-docusaurus.md rename to website/versioned_docs/version-2.0.0/api/misc/create-docusaurus.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/eslint-plugin/README.md b/website/versioned_docs/version-2.0.0/api/misc/eslint-plugin/README.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/eslint-plugin/README.md rename to website/versioned_docs/version-2.0.0/api/misc/eslint-plugin/README.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/eslint-plugin/no-untranslated-text.md b/website/versioned_docs/version-2.0.0/api/misc/eslint-plugin/no-untranslated-text.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/eslint-plugin/no-untranslated-text.md rename to website/versioned_docs/version-2.0.0/api/misc/eslint-plugin/no-untranslated-text.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/eslint-plugin/string-literal-i18n-messages.md b/website/versioned_docs/version-2.0.0/api/misc/eslint-plugin/string-literal-i18n-messages.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/eslint-plugin/string-literal-i18n-messages.md rename to website/versioned_docs/version-2.0.0/api/misc/eslint-plugin/string-literal-i18n-messages.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/logger/demo.png b/website/versioned_docs/version-2.0.0/api/misc/logger/demo.png similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/logger/demo.png rename to website/versioned_docs/version-2.0.0/api/misc/logger/demo.png diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/misc/logger/logger.md b/website/versioned_docs/version-2.0.0/api/misc/logger/logger.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/misc/logger/logger.md rename to website/versioned_docs/version-2.0.0/api/misc/logger/logger.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/README.md b/website/versioned_docs/version-2.0.0/api/plugin-methods/README.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/README.md rename to website/versioned_docs/version-2.0.0/api/plugin-methods/README.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/_category_.yml b/website/versioned_docs/version-2.0.0/api/plugin-methods/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/_category_.yml rename to website/versioned_docs/version-2.0.0/api/plugin-methods/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/extend-infrastructure.md b/website/versioned_docs/version-2.0.0/api/plugin-methods/extend-infrastructure.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/extend-infrastructure.md rename to website/versioned_docs/version-2.0.0/api/plugin-methods/extend-infrastructure.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/i18n-lifecycles.md b/website/versioned_docs/version-2.0.0/api/plugin-methods/i18n-lifecycles.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/i18n-lifecycles.md rename to website/versioned_docs/version-2.0.0/api/plugin-methods/i18n-lifecycles.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/lifecycle-apis.md b/website/versioned_docs/version-2.0.0/api/plugin-methods/lifecycle-apis.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/lifecycle-apis.md rename to website/versioned_docs/version-2.0.0/api/plugin-methods/lifecycle-apis.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/static-methods.md b/website/versioned_docs/version-2.0.0/api/plugin-methods/static-methods.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugin-methods/static-methods.md rename to website/versioned_docs/version-2.0.0/api/plugin-methods/static-methods.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/_category_.yml b/website/versioned_docs/version-2.0.0/api/plugins/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/_category_.yml rename to website/versioned_docs/version-2.0.0/api/plugins/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/overview.md b/website/versioned_docs/version-2.0.0/api/plugins/overview.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/overview.md rename to website/versioned_docs/version-2.0.0/api/plugins/overview.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-client-redirects.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-client-redirects.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-client-redirects.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-client-redirects.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-content-blog.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-content-blog.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-content-blog.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-content-blog.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-content-docs.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-content-docs.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-content-docs.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-content-docs.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-content-pages.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-content-pages.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-content-pages.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-content-pages.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-debug.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-debug.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-debug.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-debug.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-google-analytics.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-google-analytics.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-google-analytics.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-google-analytics.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-google-gtag.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-google-gtag.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-google-gtag.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-google-gtag.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-ideal-image.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-ideal-image.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-ideal-image.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-ideal-image.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-pwa.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-pwa.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-pwa.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-pwa.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-sitemap.md b/website/versioned_docs/version-2.0.0/api/plugins/plugin-sitemap.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/plugins/plugin-sitemap.md rename to website/versioned_docs/version-2.0.0/api/plugins/plugin-sitemap.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/themes/_category_.yml b/website/versioned_docs/version-2.0.0/api/themes/_category_.yml similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/themes/_category_.yml rename to website/versioned_docs/version-2.0.0/api/themes/_category_.yml diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/themes/overview.md b/website/versioned_docs/version-2.0.0/api/themes/overview.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/themes/overview.md rename to website/versioned_docs/version-2.0.0/api/themes/overview.md diff --git a/website/versioned_docs/version-2.0.0/api/themes/theme-classic.md b/website/versioned_docs/version-2.0.0/api/themes/theme-classic.md new file mode 100644 index 0000000000..cba54b875a --- /dev/null +++ b/website/versioned_docs/version-2.0.0/api/themes/theme-classic.md @@ -0,0 +1,61 @@ +--- +sidebar_position: 2 +slug: /api/themes/@docusaurus/theme-classic +--- + +# 📦 theme-classic + +The classic theme for Docusaurus. + +You can refer to the [theme configuration page](theme-configuration.md) for more details on the configuration. + +```bash npm2yarn +npm install --save @docusaurus/theme-classic +``` + +:::tip + +If you have installed `@docusaurus/preset-classic`, you don't need to install it as a dependency. + +::: + +## Configuration {#configuration} + +Accepted fields: + +```mdx-code-block + +``` + +| Option | Type | Default | Description | +| --- | --- | --- | --- | +| `customCss` | string[] \| string | `[]` | Stylesheets to be imported globally as [client modules](../../advanced/client.md#client-modules). Relative paths are resolved against the site directory. | + +```mdx-code-block + +``` + +:::note + +Most configuration for the theme is done in `themeConfig`, which can be found in [theme configuration](./theme-configuration.md). + +::: + +### Example configuration {#ex-config} + +You can configure this theme through preset options or plugin options. + +:::tip + +Most Docusaurus users configure this plugin through the preset options. + +::: + +```js config-tabs +// Preset Options: theme +// Plugin Options: @docusaurus/theme-classic + +const config = { + customCss: require.resolve('./src/css/custom.css'), +}; +``` diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-configuration.md b/website/versioned_docs/version-2.0.0/api/themes/theme-configuration.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-configuration.md rename to website/versioned_docs/version-2.0.0/api/themes/theme-configuration.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-live-codeblock.md b/website/versioned_docs/version-2.0.0/api/themes/theme-live-codeblock.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-live-codeblock.md rename to website/versioned_docs/version-2.0.0/api/themes/theme-live-codeblock.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-search-algolia.md b/website/versioned_docs/version-2.0.0/api/themes/theme-search-algolia.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/api/themes/theme-search-algolia.md rename to website/versioned_docs/version-2.0.0/api/themes/theme-search-algolia.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/assets/docusaurus-asset-example-banner.png b/website/versioned_docs/version-2.0.0/assets/docusaurus-asset-example-banner.png similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/assets/docusaurus-asset-example-banner.png rename to website/versioned_docs/version-2.0.0/assets/docusaurus-asset-example-banner.png diff --git a/website/versioned_docs/version-2.0.0-beta.22/assets/docusaurus-asset-example.docx b/website/versioned_docs/version-2.0.0/assets/docusaurus-asset-example.docx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/assets/docusaurus-asset-example.docx rename to website/versioned_docs/version-2.0.0/assets/docusaurus-asset-example.docx diff --git a/website/versioned_docs/version-2.0.0-beta.22/assets/docusaurus-asset-example.xyz b/website/versioned_docs/version-2.0.0/assets/docusaurus-asset-example.xyz similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/assets/docusaurus-asset-example.xyz rename to website/versioned_docs/version-2.0.0/assets/docusaurus-asset-example.xyz diff --git a/website/versioned_docs/version-2.0.0-beta.22/blog.mdx b/website/versioned_docs/version-2.0.0/blog.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/blog.mdx rename to website/versioned_docs/version-2.0.0/blog.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/browser-support.md b/website/versioned_docs/version-2.0.0/browser-support.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/browser-support.md rename to website/versioned_docs/version-2.0.0/browser-support.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/cli.md b/website/versioned_docs/version-2.0.0/cli.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/cli.md rename to website/versioned_docs/version-2.0.0/cli.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/configuration.md b/website/versioned_docs/version-2.0.0/configuration.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/configuration.md rename to website/versioned_docs/version-2.0.0/configuration.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/deployment.mdx b/website/versioned_docs/version-2.0.0/deployment.mdx similarity index 99% rename from website/versioned_docs/version-2.0.0-beta.22/deployment.mdx rename to website/versioned_docs/version-2.0.0/deployment.mdx index 642530ea69..d285b6447f 100644 --- a/website/versioned_docs/version-2.0.0-beta.22/deployment.mdx +++ b/website/versioned_docs/version-2.0.0/deployment.mdx @@ -320,14 +320,14 @@ GIT_USER= yarn deploy cmd /C "set "GIT_USER=" && yarn deploy" ``` -````mdx-code-block +```mdx-code-block -```mdx-code-block +``` ```powershell cmd /C 'set "GIT_USER=" && yarn deploy' -```` +``` ```mdx-code-block diff --git a/website/versioned_docs/version-2.0.0-beta.22/docusaurus-core.md b/website/versioned_docs/version-2.0.0/docusaurus-core.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/docusaurus-core.md rename to website/versioned_docs/version-2.0.0/docusaurus-core.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/creating-pages.md b/website/versioned_docs/version-2.0.0/guides/creating-pages.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/creating-pages.md rename to website/versioned_docs/version-2.0.0/guides/creating-pages.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/docs-create-doc.mdx b/website/versioned_docs/version-2.0.0/guides/docs/docs-create-doc.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/docs-create-doc.mdx rename to website/versioned_docs/version-2.0.0/guides/docs/docs-create-doc.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/docs-introduction.md b/website/versioned_docs/version-2.0.0/guides/docs/docs-introduction.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/docs-introduction.md rename to website/versioned_docs/version-2.0.0/guides/docs/docs-introduction.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/docs-multi-instance.mdx b/website/versioned_docs/version-2.0.0/guides/docs/docs-multi-instance.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/docs-multi-instance.mdx rename to website/versioned_docs/version-2.0.0/guides/docs/docs-multi-instance.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/autogenerated.md b/website/versioned_docs/version-2.0.0/guides/docs/sidebar/autogenerated.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/autogenerated.md rename to website/versioned_docs/version-2.0.0/guides/docs/sidebar/autogenerated.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/index.md b/website/versioned_docs/version-2.0.0/guides/docs/sidebar/index.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/index.md rename to website/versioned_docs/version-2.0.0/guides/docs/sidebar/index.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/items.md b/website/versioned_docs/version-2.0.0/guides/docs/sidebar/items.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/items.md rename to website/versioned_docs/version-2.0.0/guides/docs/sidebar/items.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/multiple-sidebars.md b/website/versioned_docs/version-2.0.0/guides/docs/sidebar/multiple-sidebars.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/sidebar/multiple-sidebars.md rename to website/versioned_docs/version-2.0.0/guides/docs/sidebar/multiple-sidebars.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/docs/versioning.md b/website/versioned_docs/version-2.0.0/guides/docs/versioning.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/docs/versioning.md rename to website/versioned_docs/version-2.0.0/guides/docs/versioning.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/_markdown-partial-example.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/_markdown-partial-example.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/_markdown-partial-example.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/_markdown-partial-example.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-admonitions.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-admonitions.mdx similarity index 62% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-admonitions.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-admonitions.mdx index 719dd371c9..94f7cb7b61 100644 --- a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-admonitions.mdx +++ b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-admonitions.mdx @@ -11,7 +11,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import Admonition from '@theme/Admonition'; -In addition to the basic Markdown syntax, we use [remark-admonitions](https://github.com/elviswolcott/remark-admonitions) alongside MDX to add support for admonitions. Admonitions are wrapped by a set of 3 colons. +In addition to the basic Markdown syntax, we have a special admonitions syntax by wrapping text with a set of 3 colons, followed by a label denoting its type. Example: @@ -107,7 +107,7 @@ Hello world ## Specifying title {#specifying-title} -You may also specify an optional title +You may also specify an optional title. ```md :::note Your Title @@ -204,3 +204,53 @@ The types that are accepted are the same as above: `note`, `tip`, `danger`, `inf ``` + +## Customizing admonitions {#customizing-admonitions} + +There are two kinds of customizations possible with admonitions: **parsing** and **rendering**. + +### Customizing rendering behavior {#customizing-rendering-behavior} + +You can customize how each individual admonition type is rendered through [swizzling](../../swizzling.md). You can often achieve your goal through a simple wrapper. For example, in the follow example, we swap out the icon for `info` admonitions only. + +```jsx title="src/theme/Admonition.js" +import React from 'react'; +import Admonition from '@theme-original/Admonition'; +import MyIcon from '@site/static/img/info.svg'; + +export default function AdmonitionWrapper(props) { + if (props.type !== 'info') { + return ; + } + return } {...props} />; +} +``` + +### Customizing parsing behavior {#customizing-parsing-behavior} + +Admonitions are implemented with a [Remark plugin](./markdown-features-plugins.mdx). The plugin is designed to be configurable. To customize the Remark plugin for a specific content plugin (docs, blog, pages), pass the options through the `admonitions` key. + +```js title="docusaurus.config.js" +module.exports = { + presets: [ + [ + '@docusaurus/preset-classic', + { + docs: { + admonitions: { + tag: ':::', + keywords: ['note', 'tip', 'info', 'caution', 'danger'], + }, + }, + }, + ], + ], +}; +``` + +The plugin accepts two options: + +- `tag`: The tag that encloses the admonition. Defaults to `:::`. +- `keywords`: An array of keywords that can be used as the type for the admonition. Note that if you override this, the default values will not be applied. + +The `keyword` will be passed as the `type` prop of the `Admonition` component. If you register more types than the default, you are also responsible for providing their implementation—including the container's style, icon, default title text, etc. You would usually need to [eject](../../swizzling.md#ejecting) the `@theme/Admonition` component, so you could re-use the same infrastructure as the other types. diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-assets.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-assets.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-assets.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-assets.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-code-blocks.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-code-blocks.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-code-blocks.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-code-blocks.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-head-metadata.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-head-metadata.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-head-metadata.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-head-metadata.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-intro.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-intro.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-intro.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-intro.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-links.md b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-links.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-links.md rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-links.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-math-equations.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-math-equations.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-math-equations.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-math-equations.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-plugins.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-plugins.mdx similarity index 98% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-plugins.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-plugins.mdx index 6a7a3629c1..50e6d37a6d 100644 --- a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-plugins.mdx +++ b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-plugins.mdx @@ -25,7 +25,7 @@ If you play with the [MDX playground](https://mdx-git-renovate-babel-monorepo-md :::tip -Use plugins to introduce shorter syntax for the most commonly used JSX elements in your project. The [admonition](./markdown-features-admonitions.mdx) syntax that we offer is also generated by a [Remark plugin](https://github.com/elviswolcott/remark-admonitions), and you could do the same for your own use case. +Use plugins to introduce shorter syntax for the most commonly used JSX elements in your project. The [admonition](./markdown-features-admonitions.mdx) syntax that we offer is also generated by a Remark plugin, and you could do the same for your own use case. ::: diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-react.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-react.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-react.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-react.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-react.module.css b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-react.module.css similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-react.module.css rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-react.module.css diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-tabs-styles.module.css b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-tabs-styles.module.css similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-tabs-styles.module.css rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-tabs-styles.module.css diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-tabs.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-tabs.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-tabs.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-tabs.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-toc.mdx b/website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-toc.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/markdown-features/markdown-features-toc.mdx rename to website/versioned_docs/version-2.0.0/guides/markdown-features/markdown-features-toc.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/guides/whats-next.md b/website/versioned_docs/version-2.0.0/guides/whats-next.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/guides/whats-next.md rename to website/versioned_docs/version-2.0.0/guides/whats-next.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-crowdin.mdx b/website/versioned_docs/version-2.0.0/i18n/i18n-crowdin.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-crowdin.mdx rename to website/versioned_docs/version-2.0.0/i18n/i18n-crowdin.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-git.md b/website/versioned_docs/version-2.0.0/i18n/i18n-git.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-git.md rename to website/versioned_docs/version-2.0.0/i18n/i18n-git.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-introduction.md b/website/versioned_docs/version-2.0.0/i18n/i18n-introduction.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-introduction.md rename to website/versioned_docs/version-2.0.0/i18n/i18n-introduction.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-tutorial.md b/website/versioned_docs/version-2.0.0/i18n/i18n-tutorial.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/i18n/i18n-tutorial.md rename to website/versioned_docs/version-2.0.0/i18n/i18n-tutorial.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/installation.md b/website/versioned_docs/version-2.0.0/installation.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/installation.md rename to website/versioned_docs/version-2.0.0/installation.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/introduction.md b/website/versioned_docs/version-2.0.0/introduction.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/introduction.md rename to website/versioned_docs/version-2.0.0/introduction.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/migration/migration-automated.md b/website/versioned_docs/version-2.0.0/migration/migration-automated.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/migration/migration-automated.md rename to website/versioned_docs/version-2.0.0/migration/migration-automated.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/migration/migration-manual.md b/website/versioned_docs/version-2.0.0/migration/migration-manual.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/migration/migration-manual.md rename to website/versioned_docs/version-2.0.0/migration/migration-manual.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/migration/migration-overview.md b/website/versioned_docs/version-2.0.0/migration/migration-overview.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/migration/migration-overview.md rename to website/versioned_docs/version-2.0.0/migration/migration-overview.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/migration/migration-translated-sites.md b/website/versioned_docs/version-2.0.0/migration/migration-translated-sites.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/migration/migration-translated-sites.md rename to website/versioned_docs/version-2.0.0/migration/migration-translated-sites.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/migration/migration-versioned-sites.md b/website/versioned_docs/version-2.0.0/migration/migration-versioned-sites.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/migration/migration-versioned-sites.md rename to website/versioned_docs/version-2.0.0/migration/migration-versioned-sites.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/playground.mdx b/website/versioned_docs/version-2.0.0/playground.mdx similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/playground.mdx rename to website/versioned_docs/version-2.0.0/playground.mdx diff --git a/website/versioned_docs/version-2.0.0-beta.22/search.md b/website/versioned_docs/version-2.0.0/search.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/search.md rename to website/versioned_docs/version-2.0.0/search.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/seo.md b/website/versioned_docs/version-2.0.0/seo.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/seo.md rename to website/versioned_docs/version-2.0.0/seo.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/static-assets.md b/website/versioned_docs/version-2.0.0/static-assets.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/static-assets.md rename to website/versioned_docs/version-2.0.0/static-assets.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/styling-layout.md b/website/versioned_docs/version-2.0.0/styling-layout.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/styling-layout.md rename to website/versioned_docs/version-2.0.0/styling-layout.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/swizzling.md b/website/versioned_docs/version-2.0.0/swizzling.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/swizzling.md rename to website/versioned_docs/version-2.0.0/swizzling.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/typescript-support.md b/website/versioned_docs/version-2.0.0/typescript-support.md similarity index 100% rename from website/versioned_docs/version-2.0.0-beta.22/typescript-support.md rename to website/versioned_docs/version-2.0.0/typescript-support.md diff --git a/website/versioned_docs/version-2.0.0-beta.22/using-plugins.md b/website/versioned_docs/version-2.0.0/using-plugins.md similarity index 94% rename from website/versioned_docs/version-2.0.0-beta.22/using-plugins.md rename to website/versioned_docs/version-2.0.0/using-plugins.md index e6f83f13e1..1994fe7e80 100644 --- a/website/versioned_docs/version-2.0.0-beta.22/using-plugins.md +++ b/website/versioned_docs/version-2.0.0/using-plugins.md @@ -180,26 +180,6 @@ module.exports = { }; ``` -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: {}, - }, - }, - ], - ], -}; -``` - ### Installing presets {#installing-presets} A preset is usually an npm package, so you install them like other npm packages using npm. diff --git a/website/versioned_sidebars/version-2.0.0-beta.22-sidebars.json b/website/versioned_sidebars/version-2.0.0-sidebars.json similarity index 100% rename from website/versioned_sidebars/version-2.0.0-beta.22-sidebars.json rename to website/versioned_sidebars/version-2.0.0-sidebars.json diff --git a/website/versions.json b/website/versions.json index 0f70574ca6..b69d84e5bc 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,4 +1,4 @@ [ - "2.0.0-rc.1", - "2.0.0-beta.22" + "2.0.0", + "2.0.0-rc.1" ] diff --git a/website/versionsArchived.json b/website/versionsArchived.json index cd90d79c1d..c01e206df8 100644 --- a/website/versionsArchived.json +++ b/website/versionsArchived.json @@ -1,4 +1,5 @@ { + "2.0.0-beta.22": "https://62e6a82f2c09f60009c53522--docusaurus-2.netlify.app/docs/2.0.0-beta.22", "2.0.0-beta.21": "https://62d02ff810c1170009a4fa0c--docusaurus-2.netlify.app/docs/2.0.0-beta.21", "2.0.0-beta.20": "https://62c814ff3641af00082fe735--docusaurus-2.netlify.app/docs/2.0.0-beta.20", "2.0.0-beta.19": "https://6290e4c00805dd0009fb3080--docusaurus-2.netlify.app/docs/2.0.0-beta.19",