mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 04:12:53 +02:00
Merge branch 'main' into ozaki/showcase
This commit is contained in:
commit
99a4c5f9a7
65 changed files with 1842 additions and 524 deletions
|
@ -174,6 +174,41 @@ export default {
|
|||
- `calendar`: the [calendar](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar) used to calculate the date era. Note that it doesn't control the actual string displayed: `MM/DD/YYYY` and `DD/MM/YYYY` are both `gregory`. To choose the format (`DD/MM/YYYY` or `MM/DD/YYYY`), set your locale name to `en-GB` or `en-US` (`en` means `en-US`).
|
||||
- `path`: Root folder that all plugin localization folders of this locale are relative to. Will be resolved against `i18n.path`. Defaults to the locale's name. Note: this has no effect on the locale's `baseUrl`—customization of base URL is a work-in-progress.
|
||||
|
||||
### `future` {#future}
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
The `future` configuration object permits to opt-in for upcoming/unstable/experimental Docusaurus features that are not ready for prime time.
|
||||
|
||||
It is also a way to opt-in for upcoming breaking changes coming in the next major versions, enabling you to prepare your site for the next version while staying on the previous one. The [Remix Future Flags blog post](https://remix.run/blog/future-flags) greatly explains this idea.
|
||||
|
||||
:::danger Breaking changes in minor versions
|
||||
|
||||
Features prefixed by `experimental_` or `unstable_` are subject to changes in **minor versions**, and not considered as [Semantic Versioning breaking changes](/community/release-process).
|
||||
|
||||
Features prefixed by `v<MajorVersion>_` (`v6_` `v7_`, etc.) are future flags that are expected to be turned on by default in the next major versions. These are less likely to change, but we keep the possibility to do so.
|
||||
|
||||
`future` API breaking changes should be easy to handle, and will be documented in minor/major version blog posts.
|
||||
|
||||
:::
|
||||
|
||||
Example:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
future: {
|
||||
experimental_storage: {
|
||||
type: 'localStorage',
|
||||
namespace: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
- `experimental_storage`: Site-wide browser storage options that theme authors should strive to respect.
|
||||
- `type`: The browser storage theme authors should use. Possible values are `localStorage` and `sessionStorage`. Defaults to `localStorage`.
|
||||
- `namespace`: Whether to namespace the browser storage keys to avoid storage key conflicts when Docusaurus sites are hosted under the same domain, or on localhost. Possible values are `string | boolean`. The namespace is appended at the end of the storage keys `key-namespace`. Use `true` to automatically generate a random namespace from your site `url + baseUrl`. Defaults to `false` (no namespace, historical behavior).
|
||||
|
||||
### `noIndex` {#noIndex}
|
||||
|
||||
- Type: `boolean`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue