mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
fixup! feat: add subfolders to folder page: respect showSubfolders option
This commit is contained in:
parent
9dac4c8239
commit
2252f3bb43
@ -46,12 +46,12 @@ export default ((opts?: Partial<FolderContentOptions>) => {
|
||||
|
||||
if (isDirectChild) {
|
||||
allPagesInFolder.push(file)
|
||||
} else {
|
||||
} else if (options.showSubfolders) {
|
||||
const folderSlug = joinSegments(...fileParts.slice(0, folderParts.length + 1)) as FullSlug
|
||||
if (!allSubfolders.has(folderSlug)) {
|
||||
allPagesInFolder.push(_createFolderData(folderSlug))
|
||||
allSubfolders.add(folderSlug)
|
||||
}
|
||||
allSubfolders.add(folderSlug)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user