fix: typo in permalink check

This commit is contained in:
Emile Bangma 2025-03-05 12:53:55 +01:00 committed by GitHub
parent 6ffbd905fb
commit 8df33942eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ export function getAliasSlugs(aliases: string[], _argv: Argv, file: VFile): Full
)
const permalink = file.data.frontmatter?.permalink
if (typeof permalink === "string") {
const absolutePermalink = permalink.startsWith("?") ? permalink : `/${permalink}`
const absolutePermalink = permalink.startsWith("/") ? permalink : `/${permalink}`
slugs.push(absolutePermalink as FullSlug)
}
// fix any slugs that have trailing slash