diff --git a/CHANGELOG.md b/CHANGELOG.md
index f27d9d6795..38ba3251ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,81 @@
# Docusaurus 2 Changelog
+## 2.0.0-beta.2 (2021-06-24)
+
+#### :rocket: New Feature
+
+- `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`
+ - [#5052](https://github.com/facebook/docusaurus/pull/5052) feat(v2): docs version banner configuration option ([@slorber](https://github.com/slorber))
+- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-types`, `docusaurus`
+ - [#5037](https://github.com/facebook/docusaurus/pull/5037) feat(v2): plugins injectHtmlTags + configureWebpack should receive content loaded ([@slorber](https://github.com/slorber))
+
+#### :boom: Breaking Change
+
+- `docusaurus-plugin-content-docs`
+ - [#5053](https://github.com/facebook/docusaurus/pull/5053) refactor(v2): remove deprecated docs option excludeNextVersionDocs ([@slorber](https://github.com/slorber))
+- `docusaurus-plugin-content-docs`, `docusaurus-theme-classic`
+ - [#5052](https://github.com/facebook/docusaurus/pull/5052) feat(v2): docs version banner configuration option ([@slorber](https://github.com/slorber))
+
+#### :bug: Bug Fix
+
+- `docusaurus-plugin-content-blog`, `docusaurus-types`, `docusaurus`
+ - [#5054](https://github.com/facebook/docusaurus/pull/5054) fix(v2): allow undefined favicon ([@slorber](https://github.com/slorber))
+- `docusaurus-plugin-content-docs`
+ - [#5048](https://github.com/facebook/docusaurus/pull/5048) fix(v2): read last update from inner git repositories ([@felipecrs](https://github.com/felipecrs))
+- `docusaurus-theme-classic`
+ - [#5050](https://github.com/facebook/docusaurus/pull/5050) fix(v2): add shadow to skip link on focus only ([@lex111](https://github.com/lex111))
+ - [#5035](https://github.com/facebook/docusaurus/pull/5035) fix(v2): fix some docs container/sidebar layout issues ([@slorber](https://github.com/slorber))
+- `docusaurus-mdx-loader`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-types`, `docusaurus-utils`, `docusaurus`
+ - [#5047](https://github.com/facebook/docusaurus/pull/5047) fix(v2): Fix Webpack persistent caching (evict on swizzle/alias/config change) ([@slorber](https://github.com/slorber))
+- `docusaurus-theme-classic`, `docusaurus-theme-common`
+ - [#5040](https://github.com/facebook/docusaurus/pull/5040) fix(v2): Fix announcementBar layout shifts ([@slorber](https://github.com/slorber))
+- `docusaurus`
+ - [#5034](https://github.com/facebook/docusaurus/pull/5034) fix(v2): dev css modules classnames should include filename ([@slorber](https://github.com/slorber))
+ - [#5016](https://github.com/facebook/docusaurus/pull/5016) fix(v2): add missing quote in build command output ([@manuelmeurer](https://github.com/manuelmeurer))
+- `docusaurus-module-type-aliases`, `docusaurus-theme-classic`, `docusaurus-theme-common`
+ - [#5023](https://github.com/facebook/docusaurus/pull/5023) fix(v2): ignore hash changes in useChangeRoute hook ([@lex111](https://github.com/lex111))
+- `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-utils-validation`
+ - [#5032](https://github.com/facebook/docusaurus/pull/5032) fix(v2): less strict blog/docs uri frontmatter validation ([@slorber](https://github.com/slorber))
+
+#### :nail_care: Polish
+
+- `docusaurus-plugin-content-docs`
+ - [#5053](https://github.com/facebook/docusaurus/pull/5053) refactor(v2): remove deprecated docs option excludeNextVersionDocs ([@slorber](https://github.com/slorber))
+- `docusaurus-plugin-content-docs`, `docusaurus-plugin-ideal-image`, `docusaurus-theme-bootstrap`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`
+ - [#4993](https://github.com/facebook/docusaurus/pull/4993) style(v2): reduce number of ESLint warnings ([@Josh-Cena](https://github.com/Josh-Cena))
+- Other
+ - [#5017](https://github.com/facebook/docusaurus/pull/5017) chore(v2): remove badge for v1 tests ([@loozhengyuan](https://github.com/loozhengyuan))
+
+#### :memo: Documentation
+
+- Other
+ - [#5049](https://github.com/facebook/docusaurus/pull/5049) docs(v2): Fix Gatsby theme name for docs site - Docz ([@ramiy](https://github.com/ramiy))
+ - [#5030](https://github.com/facebook/docusaurus/pull/5030) docs(v2): typo in deployment.mdx ([@eshantri](https://github.com/eshantri))
+ - [#5022](https://github.com/facebook/docusaurus/pull/5022) docs(v2): Add React Native Render HTML site to showcase page ([@jsamr](https://github.com/jsamr))
+ - [#5027](https://github.com/facebook/docusaurus/pull/5027) docs(v2): Add Buddy to deployment doc ([@tomekpapiernik](https://github.com/tomekpapiernik))
+ - [#5021](https://github.com/facebook/docusaurus/pull/5021) docs(v2): fix incorrect anchor links in website ([@teikjun](https://github.com/teikjun))
+ - [#5007](https://github.com/facebook/docusaurus/pull/5007) docs(v2): wrap mdx usage in mdx-code-block ([@slorber](https://github.com/slorber))
+- `docusaurus`
+ - [#5033](https://github.com/facebook/docusaurus/pull/5033) docs(v2): GH pages: recommend using trailingSlash ([@slorber](https://github.com/slorber))
+
+#### :house: Internal
+
+- [#5005](https://github.com/facebook/docusaurus/pull/5005) chore: add archived versions system + archive alpha.73-75 ([@slorber](https://github.com/slorber))
+
+#### Committers: 11
+
+- Alexey Pyltsyn ([@lex111](https://github.com/lex111))
+- Eshan Tripathi ([@eshantri](https://github.com/eshantri))
+- Felipe Santos ([@felipecrs](https://github.com/felipecrs))
+- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena))
+- Jules Sam. Randolph ([@jsamr](https://github.com/jsamr))
+- Manuel Meurer ([@manuelmeurer](https://github.com/manuelmeurer))
+- Rami Yushuvaev ([@ramiy](https://github.com/ramiy))
+- SΓ©bastien Lorber ([@slorber](https://github.com/slorber))
+- Teik Jun ([@teikjun](https://github.com/teikjun))
+- Tomasz Papiernik ([@tomekpapiernik](https://github.com/tomekpapiernik))
+- ZhengYuan Loo ([@loozhengyuan](https://github.com/loozhengyuan))
+
## 2.0.0-beta.1 (2021-06-18)
#### :rocket: New Feature
diff --git a/admin/publish.md b/admin/publish.md
index 774b9a551d..d631517b04 100644
--- a/admin/publish.md
+++ b/admin/publish.md
@@ -96,13 +96,13 @@ Copy the generated contents and paste them in `CHANGELOG.md`.
Adding the `--from` options seems to help:
```sh
-yarn changelog --from v2.0.0-alpha.60
+yarn changelog --from v2.0.0-beta.0
```
### 4. Cut a new version of the docs
```sh
-yarn workspace docusaurus-2-website docusaurus docs:version 2.0.0-alpha.59
+yarn workspace docusaurus-2-website docusaurus docs:version 2.0.0-beta.0
```
Test running the website with the new version locally.
@@ -173,13 +173,13 @@ If all accesses are available, build all the necessary packages, and then run th
```sh
yarn build:packages
-yarn lerna publish 2.0.0-alpha.68 --exact
+yarn lerna publish 2.0.0-beta.0 --exact
```
This command does a few things:
-- Modifies the versions of all the `package.json` in the repository to be `2.0.0-alpha.41` and creates a commit
-- Creates a new Git tag `v2.0.0-alpha.41`
+- Modifies the versions of all the `package.json` in the repository to be `2.0.0-beta.0` and creates a commit
+- Creates a new Git tag `v2.0.0-beta.0`
- Pushes the new release commit on your branch, and add a git tag
You should receive many emails notifying you that a new version of the packages has been published.
@@ -189,7 +189,7 @@ Now that the release is done, **merge the pull request**.
### 7. Create a release on GitHub
- Go to https://github.com/facebook/docusaurus/releases/new
-- Under the "Tag version" field, look for the newly-created tag, which is `v2.0.0-alpha.41` in this case
+- Under the "Tag version" field, look for the newly-created tag, which is `v2.0.0-beta.0` in this case
- Paste the CHANGELOG changes in the textarea below
- Hit the green "Publish release" button
- Profit! π°
diff --git a/website/versioned_docs/version-2.0.0-beta.2/api/docusaurus.config.js.md b/website/versioned_docs/version-2.0.0-beta.2/api/docusaurus.config.js.md
new file mode 100644
index 0000000000..c2204357ed
--- /dev/null
+++ b/website/versioned_docs/version-2.0.0-beta.2/api/docusaurus.config.js.md
@@ -0,0 +1,490 @@
+---
+id: docusaurus.config.js
+description: API reference for Docusaurus configuration file.
+slug: /docusaurus.config.js
+---
+
+# `docusaurus.config.js`
+
+## Overview {#overview}
+
+`docusaurus.config.js` contains configurations for your site and is placed in the root directory of your site.
+
+## Required fields {#required-fields}
+
+### `title` {#title}
+
+- Type: `string`
+
+Title for your website.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ title: 'Docusaurus',
+};
+```
+
+### `url` {#url}
+
+- Type: `string`
+
+URL for your website. This can also be considered the top-level hostname. For example, `https://facebook.github.io` is the URL of https://facebook.github.io/metro/, and `https://docusaurus.io` is the URL for https://docusaurus.io. This field is related to the [baseUrl](#baseurl) field.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ url: 'https://docusaurus.io',
+};
+```
+
+### `baseUrl` {#baseurl}
+
+- Type: `string`
+
+Base URL for your site. This can also be considered the path after the host. For example, `/metro/` is the baseUrl of https://facebook.github.io/metro/. For URLs that have no path, the baseUrl should be set to `/`. This field is related to the [url](#url) field.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ baseUrl: '/',
+};
+```
+
+## Optional fields {#optional-fields}
+
+### `favicon` {#favicon}
+
+- Type: `string | undefined`
+
+Path to your site favicon
+
+Example, if your favicon is in `static/img/favicon.ico`:
+
+```js title="docusaurus.config.js"
+module.exports = {
+ favicon: '/img/favicon.ico',
+};
+```
+
+### `trailingSlash` {#trailing-slash}
+
+- Type: `boolean | undefined`
+
+Allow to customize the presence/absence of a trailing slash at the end of URLs/links, and how static HTML files are generated:
+
+- `undefined` (default): keeps URLs untouched, and emit `/docs/myDoc/index.html` for `/docs/myDoc.md`
+- `true`: add trailing slashes to URLs/links, and emit `/docs/myDoc/index.html` for `/docs/myDoc.md`
+- `false`: remove trailing slashes from URLs/links, and emit `/docs/myDoc.html` for `/docs/myDoc.md`
+
+:::tip
+
+Each static hosting provider serve static files differently (this behavior may even change over time).
+
+Refer to the [deployment guide](../deployment.mdx) and [slorber/trailing-slash-guide](https://github.com/slorber/trailing-slash-guide) to choose the appropriate setting.
+
+:::
+
+### `i18n` {#i18n}
+
+- Type: `Object`
+
+The i18n configuration object to [localize your site](../i18n/i18n-introduction.md).
+
+Example:
+
+```js title="docusaurus.config.js"
+module.exports = {
+ i18n: {
+ defaultLocale: 'en',
+ locales: ['en', 'fr'],
+ localeConfigs: {
+ en: {
+ label: 'English',
+ direction: 'ltr',
+ },
+ fr: {
+ label: 'FranΓ§ais',
+ direction: 'ltr',
+ },
+ },
+ },
+};
+```
+
+- `label`: the label to use for this locale
+- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Araric, Hebrew, etc.)
+
+### `noIndex` {#noindex}
+
+- Type: `boolean`
+
+This option adds `` in pages, to tell search engines to avoid indexing your site (more information [here](https://moz.com/learn/seo/robots-meta-directives)).
+
+Example:
+
+```js title="docusaurus.config.js"
+module.exports = {
+ noIndex: true, // Defaults to `false`
+};
+```
+
+### `onBrokenLinks` {#onbrokenlinks}
+
+- Type: `'ignore' | 'log' | 'warn' | 'error' | 'throw'`
+
+The behavior of Docusaurus, when it detects any broken link.
+
+By default, it throws an error, to ensure you never ship any broken link, but you can lower this security if needed.
+
+:::note
+
+The broken links detection is only available for a production build (`docusaurus build`).
+
+:::
+
+### `onBrokenMarkdownLinks` {#onbrokenmarkdownlinks}
+
+- Type: `'ignore' | 'log' | 'warn' | 'error' | 'throw'`
+
+The behavior of Docusaurus, when it detects any broken markdown link.
+
+By default, it prints a warning, to let you know about your broken markdown link, but you can change this security if needed.
+
+### `onDuplicateRoutes` {#onduplicateroutes}
+
+- Type: `'ignore' | 'log' | 'warn' | 'error' | 'throw'`
+
+The behavior of Docusaurus when it detects any [duplicate routes](/guides/creating-pages.md#duplicate-routes).
+
+By default, it displays a warning after you run `yarn start` or `yarn build`.
+
+### `tagline` {#tagline}
+
+- Type: `string`
+
+The tagline for your website.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ tagline:
+ 'Docusaurus makes it easy to maintain Open Source documentation websites.',
+};
+```
+
+### `organizationName` {#organizationname}
+
+- Type: `string`
+
+The GitHub user or organization that owns the repository. Used by the deployment command.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ // Docusaurus' organization is facebook
+ organizationName: 'facebook',
+};
+```
+
+### `projectName` {#projectname}
+
+- Type: `string`
+
+The name of the GitHub repository. Used by the deployment command.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ projectName: 'docusaurus',
+};
+```
+
+### `githubHost` {#githubhost}
+
+- Type: `string`
+
+The hostname of your server. Useful if you are using GitHub Enterprise.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ githubHost: 'github.com',
+};
+```
+
+### `githubPort` {#githubPort}
+
+- Type: `string`
+
+The port of your server. Useful if you are using GitHub Enterprise.
+
+```js title="docusaurus.config.js"
+module.exports = {
+ githubPort: '22',
+};
+```
+
+### `themeConfig` {#themeconfig}
+
+- Type: `Object`
+
+The [theme configuration](./themes/theme-configuration.md) object, to customize your site UI like navbar, footer.
+
+Example:
+
+```js title="docusaurus.config.js"
+module.exports = {
+ themeConfig: {
+ hideableSidebar: false,
+ colorMode: {
+ defaultMode: 'light',
+ disableSwitch: false,
+ respectPrefersColorScheme: true,
+ switchConfig: {
+ darkIcon: 'π',
+ lightIcon: '\u2600',
+ // React inline style object
+ // see https://reactjs.org/docs/dom-elements.html#style
+ darkIconStyle: {
+ marginLeft: '2px',
+ },
+ lightIconStyle: {
+ marginLeft: '1px',
+ },
+ },
+ },
+ navbar: {
+ title: 'Site Title',
+ logo: {
+ alt: 'Site Logo',
+ src: 'img/logo.svg',
+ },
+ items: [
+ {
+ to: 'docs/docusaurus.config.js',
+ activeBasePath: 'docs',
+ label: 'docusaurus.config.js',
+ position: 'left',
+ },
+ // ... other links
+ ],
+ },
+ footer: {
+ style: 'dark',
+ links: [
+ {
+ title: 'Docs',
+ items: [
+ {
+ label: 'Docs',
+ to: 'docs/doc1',
+ },
+ ],
+ },
+ // ... other links
+ ],
+ logo: {
+ alt: 'Facebook Open Source Logo',
+ src: 'https://docusaurus.io/img/oss_logo.png',
+ },
+ copyright: `Copyright Β© ${new Date().getFullYear()} Facebook, Inc.`, // You can also put own HTML here
+ },
+ },
+};
+```
+
+### `plugins` {#plugins}
+
+
+
+- Type: `any[]`
+
+```js title="docusaurus.config.js"
+module.exports = {
+ plugins: [],
+};
+```
+
+### `themes` {#themes}
+
+
+
+- Type: `any[]`
+
+```js title="docusaurus.config.js"
+module.exports = {
+ themes: [],
+};
+```
+
+### `presets` {#presets}
+
+
+
+- Type: `any[]`
+
+```js title="docusaurus.config.js"
+module.exports = {
+ presets: [],
+};
+```
+
+### `customFields` {#customfields}
+
+Docusaurus guards `docusaurus.config.js` from unknown fields. To add a custom field, define it on `customFields`.
+
+- Type: `Object`
+
+```js title="docusaurus.config.js"
+module.exports = {
+ customFields: {
+ admin: 'endi',
+ superman: 'lol',
+ },
+};
+```
+
+Attempting to add unknown field in the config will lead to error in build time:
+
+```bash
+Error: The field(s) 'foo', 'bar' are not recognized in docusaurus.config.js
+```
+
+### `scripts` {#scripts}
+
+An array of scripts to load. The values can be either strings or plain objects of attribute-value maps. The `
+ <% }); %>
+ <%~ it.postBodyTags %>
+