mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 17:37:09 +02:00
feat(v2): docs options.onlyIncludeVersions (#3373)
* docs options.onlyIncludeVersions * adapt docsVersionDropdown if we render a single version * fix bad error message * fix netlify deploy when versioning is disabled
This commit is contained in:
parent
149d82c730
commit
d8cfabb66a
8 changed files with 144 additions and 22 deletions
|
@ -178,6 +178,10 @@ module.exports = {
|
|||
remarkPlugins: [require('./src/plugins/remark-npm2yarn')],
|
||||
disableVersioning: isVersioningDisabled,
|
||||
lastVersion: isDev || isDeployPreview ? 'current' : undefined,
|
||||
onlyIncludeVersions:
|
||||
!isVersioningDisabled && (isDev || isDeployPreview)
|
||||
? ['current', ...versions.slice(0, 2)]
|
||||
: undefined,
|
||||
versions: {
|
||||
current: {
|
||||
// path: isDev || isDeployPreview ? '' : 'next',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue