Merge 311f92011f7e667b2a501e40670819a719c34e82 into 4e4930ef9c2e2ddb9bcb1436660d3a3002c19844

This commit is contained in:
Ivan Chernov 2025-01-30 21:51:21 +00:00 committed by GitHub
commit 53481aa99e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,6 +49,12 @@ export const AliasRedirects: QuartzEmitterPlugin = () => ({
}
for (let slug of slugs) {
// prevent infinite redirect if permalink is same as fullSlug
if (`/${ogSlug}/` == `${slug}`) {
console.warn(`AliasRedirects: ${slug} is the same as the original slug`)
continue
}
// fix any slugs that have trailing slash
if (slug.endsWith("/")) {
slug = joinSegments(slug, "index") as FullSlug