Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gatsby-node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ const createPage = async (
// on the page. this is used for policy pages as well as some index pages that don't
// have any editable content
if (frontmatter.edit_on_github !== false) {
context.editUrl = getRepo(path, frontmatter).replace(`https://github.com/{nwo}/edit/{branch}/{path}`)
const repo = getRepo(path, frontmatter)
// Use the repo.replace method to ensure the URL tokens are properly replaced
context.editUrl = repo.replace(`https://github.com/{nwo}/edit/{branch}/{path}`)
Object.assign(context, await fetchContributors(path, frontmatter, {reporter, octokit}))
}

Expand Down