Skip to content

Commit

Permalink
fix: update page edit path logic [Fixes #11994]
Browse files Browse the repository at this point in the history
  • Loading branch information
wackerow committed Feb 1, 2024
1 parent 5f94285 commit 4f06680
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/utils/editPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ import { join } from 'path'

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

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

0 comments on commit 4f06680

Please sign in to comment.