-
-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
It would be helpful if editLink.pattern
accepted a function with a path
argument so the "Edit on Github" link could be customized per page.
Ideal usage would look something like this:
editLink: {
pattern: (path) => {
if (path.startsWith('/ensip/')) {
return `https://github.com/ensdomains/ensips/edit/master/ensips/${path}.md`
}
return `https://github.com/ensdomains/docs/edit/master/src/pages/${path}`
},
text: 'Edit on Github',
},
An example use case is ENS, where our ENSIP pages are generated from another repo at build time.
Related to ensdomains/docs#446
Metadata
Metadata
Assignees
Labels
No labels