mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
fix: generate notes permalink fail in windows #11
This commit is contained in:
parent
c79f944fa8
commit
5486aa9d4f
@ -40,9 +40,7 @@ export default function autoFrontmatter(
|
||||
const notes = localeOption.locales?.[locale].notes
|
||||
if (!notes) return ''
|
||||
const dir = notes.dir
|
||||
return dir
|
||||
? path.join(locale, dir).replace(/\\+/g, '/').replace(/^\//, '')
|
||||
: ''
|
||||
return dir ? normalizePath(path.join(locale, dir)).replace(/^\//, '') : ''
|
||||
})
|
||||
.filter(Boolean)
|
||||
|
||||
@ -123,7 +121,7 @@ export default function autoFrontmatter(
|
||||
localesNotesDirs.length
|
||||
? {
|
||||
include: localesNotesDirs.map((dir) =>
|
||||
path.join(dir, '**/**.md').replace(/\\+/g, '/')
|
||||
normalizePath(path.join(dir, '**/**.md').replace(/\\+/g, '/'))
|
||||
),
|
||||
formatter: {
|
||||
title(title: string, { filepath }) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user