Skip to content

Commit 4f06680

Browse files
committed
fix: update page edit path logic [Fixes #11994]
1 parent 5f94285 commit 4f06680

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/utils/editPath.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ import { join } from 'path'
22

33
import { CONTENT_DIR, EDIT_CONTENT_URL } from '@/lib/constants'
44

5-
export const getEditPath = (relativePath: string): string => join(EDIT_CONTENT_URL, CONTENT_DIR, relativePath, "index.md")
5+
export const getEditPath = (relativePath: string): string => {
6+
const { href } = new URL(join(CONTENT_DIR, relativePath, "index.md"), EDIT_CONTENT_URL)
7+
return href
8+
}

0 commit comments

Comments
 (0)