Skip to content

Commit

Permalink
editUrl should target upstream release
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Feb 17, 2021
1 parent cf080c7 commit 02f82ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 02f82ae

Please sign in to comment.