mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-29 08:57:03 +02:00
refactor(website): make deploy preview open next version docs by default (#6120)
* refactor(website): make deploy preview open next version docs by default * Fix links
This commit is contained in:
parent
0c2765fb74
commit
7db4884853
4 changed files with 12 additions and 10 deletions
|
@ -391,7 +391,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
See it in action in the [Docusaurus Guides pages](/docs/next/category/guides).
|
||||
See it in action in the [Docusaurus Guides pages](/docs/category/guides).
|
||||
|
||||
:::tip
|
||||
|
||||
|
|
|
@ -268,13 +268,15 @@ const config = {
|
|||
remarkPlugins: [math, [npm2yarn, {sync: true}]],
|
||||
rehypePlugins: [katex],
|
||||
disableVersioning: isVersioningDisabled,
|
||||
lastVersion: isDev ? 'current' : undefined,
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
onlyIncludeVersions: isBuildFast
|
||||
? ['current']
|
||||
: !isVersioningDisabled && (isDev || isDeployPreview)
|
||||
? ['current', ...versions.slice(0, 2)]
|
||||
: undefined,
|
||||
lastVersion: isDev || isDeployPreview ? 'current' : undefined,
|
||||
onlyIncludeVersions: (() => {
|
||||
if (isBuildFast) {
|
||||
return ['current'];
|
||||
} else if (!isVersioningDisabled && (isDev || isDeployPreview)) {
|
||||
return ['current', ...versions.slice(0, 2)];
|
||||
}
|
||||
return undefined;
|
||||
})(),
|
||||
versions: {
|
||||
current: {
|
||||
path: isDev || isBuildFast ? 'next' : undefined,
|
||||
|
|
|
@ -391,7 +391,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
See it in action in the [Docusaurus Guides pages](/docs/next/category/guides).
|
||||
See it in action in the [Docusaurus Guides pages](/docs/category/guides).
|
||||
|
||||
:::tip
|
||||
|
||||
|
|
|
@ -391,7 +391,7 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
See it in action in the [Docusaurus Guides pages](/docs/next/category/guides).
|
||||
See it in action in the [Docusaurus Guides pages](/docs/category/guides).
|
||||
|
||||
:::tip
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue