mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
feat(v2): editUrl functions should receive md doc permalink (#4232)
This commit is contained in:
parent
2ff5d347ba
commit
ae988d0eb9
8 changed files with 79 additions and 63 deletions
|
@ -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}`;
|
||||
},
|
||||
/**
|
||||
|
|
|
@ -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}`;
|
||||
},
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue