mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-24 22:46:57 +02:00
fix(v2): website editUrl should target upstream docs (#4233)
This commit is contained in:
parent
cf080c72ba
commit
7c2b81f5b6
1 changed files with 5 additions and 3 deletions
|
@ -228,13 +228,15 @@ const LocaleConfigs = isI18nStaging
|
|||
// routeBasePath: '/',
|
||||
path: 'docs',
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
editUrl: ({locale, versionDocsDirPath, docPath}) => {
|
||||
editUrl: ({locale, docPath}) => {
|
||||
if (locale !== 'en') {
|
||||
return `https://crowdin.com/project/docusaurus-v2/${locale}`;
|
||||
}
|
||||
return `https://github.com/facebook/docusaurus/edit/master/website/${versionDocsDirPath}/${docPath}`;
|
||||
// We want users to submit doc updates to the upstream/next version!
|
||||
// Otherwise we risk losing the update on the next release.
|
||||
const nextVersionDocsDirPath = 'docs';
|
||||
return `https://github.com/facebook/docusaurus/edit/master/website/${nextVersionDocsDirPath}/${docPath}`;
|
||||
},
|
||||
editCurrentVersion: true,
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
remarkPlugins: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue