feat(v2): editUrl functions should receive md doc permalink (#4232)

This commit is contained in:
Sébastien Lorber 2021-02-17 11:48:33 +01:00 committed by GitHub
parent 2ff5d347ba
commit ae988d0eb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 79 additions and 63 deletions

View file

@ -38,7 +38,7 @@ module.exports = {
/**
* For advanced cases, compute the edit url for each markdown file yourself.
*/
editUrl: ({locale, blogDirPath, blogPath}) => {
editUrl: ({locale, blogDirPath, blogPath, permalink}) => {
return `https://github.com/facebook/docusaurus/edit/master/website/${blogDirPath}/${blogPath}`;
},
/**

View file

@ -38,7 +38,13 @@ module.exports = {
/**
* For advanced cases, compute the edit url for each markdown file yourself.
*/
editUrl: function ({locale, version, versionDocsDirPath, docPath}) {
editUrl: function ({
locale,
version,
versionDocsDirPath,
docPath,
permalink,
}) {
return `https://github.com/facebook/docusaurus/edit/master/website/${versionDocsDirPath}/${docPath}`;
},
/**