mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 05:57:05 +02:00
feat(v2): new docs edit options: editCurrentVersion + editLocalizedDocs (#3949)
* editCurrentVersion initial poc * ensure edit url allows to edit localized docs * Add editLocalizedDocs option * keep editing current version in dev (more convenient)
This commit is contained in:
parent
2791ccc4cf
commit
b5c46bd1d9
13 changed files with 394 additions and 59 deletions
|
@ -77,6 +77,7 @@ module.exports = {
|
|||
id: 'community',
|
||||
path: 'community',
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/master/website/',
|
||||
editCurrentVersion: true,
|
||||
routeBasePath: 'community',
|
||||
sidebarPath: require.resolve('./sidebarsCommunity.js'),
|
||||
showLastUpdateAuthor: true,
|
||||
|
@ -205,20 +206,21 @@ module.exports = {
|
|||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/master/website/',
|
||||
editCurrentVersion: true,
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
remarkPlugins: [
|
||||
[require('@docusaurus/remark-plugin-npm2yarn'), {sync: true}],
|
||||
],
|
||||
disableVersioning: isVersioningDisabled,
|
||||
lastVersion: 'current',
|
||||
lastVersion: isDev ? 'current' : undefined,
|
||||
onlyIncludeVersions:
|
||||
!isVersioningDisabled && (isDev || isDeployPreview)
|
||||
? ['current', ...versions.slice(0, 2)]
|
||||
: undefined,
|
||||
versions: {
|
||||
current: {
|
||||
label: `${getNextAlphaVersionName()} (unreleased)`,
|
||||
label: `${getNextAlphaVersionName()} 🚧`,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue