mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-05-19 06:54:18 +02:00
Merge 311f92011f7e667b2a501e40670819a719c34e82 into 4e4930ef9c2e2ddb9bcb1436660d3a3002c19844
This commit is contained in:
commit
53481aa99e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user