fix tag pages to emit to tag/index.html to override content and folder pages
This commit is contained in:
@ -29,15 +29,12 @@ export const FolderPage: QuartzEmitterPlugin<FullPageLayout> = (opts) => {
|
||||
const folders: Set<CanonicalSlug> = new Set(allFiles.flatMap(data => {
|
||||
const slug = data.slug
|
||||
const folderName = path.dirname(slug ?? "") as CanonicalSlug
|
||||
if (slug && folderName !== ".") {
|
||||
if (slug && folderName !== "." && folderName !== "tags") {
|
||||
return [folderName]
|
||||
}
|
||||
return []
|
||||
}))
|
||||
|
||||
// remove special prefixes
|
||||
folders.delete("tags" as CanonicalSlug)
|
||||
|
||||
const folderDescriptions: Record<string, ProcessedContent> = Object.fromEntries([...folders].map(folder => ([
|
||||
folder, defaultProcessedContent({ slug: joinSegments(folder, "index") as ServerSlug, frontmatter: { title: `Folder: ${folder}`, tags: [] } })
|
||||
])))
|
||||
|
Reference in New Issue
Block a user