Skip to content

Commit

Permalink
fix editUrl on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jan 29, 2021
1 parent 26be22c commit 38d4f02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-content-blog/src/blogUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export async function generateBlogPosts(

const contentPathEditUrl = normalizeUrl([
siteEditUrl,
path.relative(siteDir, fileContentPath),
posixPath(path.relative(siteDir, fileContentPath)),
]);

return getEditUrl(blogPathRelative, contentPathEditUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ describe('simple site', () => {
expect(editUrlFunction).toHaveBeenCalledWith({
version: 'current',
versionDocsDirPath: 'docs',
docPath: path.join('foo', 'baz.md'),
docPath: path.posix.join('foo', 'baz.md'),
locale: 'en',
});
});
Expand Down

0 comments on commit 38d4f02

Please sign in to comment.