mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
Supposedly prettier
This commit is contained in:
parent
e68749d6e4
commit
d430bf7532
@ -42,7 +42,7 @@ export default ((opts?: Partial<FolderContentOptions>) => {
|
||||
|
||||
const allPagesInFolder: QuartzPluginData[] = fileData.isGlobalFolder
|
||||
? allFiles
|
||||
: folder!.children
|
||||
: (folder!.children
|
||||
.map((node) => {
|
||||
// regular file, proceed
|
||||
if (node.data) {
|
||||
@ -92,7 +92,7 @@ export default ((opts?: Partial<FolderContentOptions>) => {
|
||||
}
|
||||
}
|
||||
})
|
||||
.filter((page) => page !== undefined) ?? []
|
||||
.filter((page) => page !== undefined) ?? [])
|
||||
const cssClasses: string[] = fileData.frontmatter?.cssclasses ?? []
|
||||
const classes = cssClasses.join(" ")
|
||||
const listProps = {
|
||||
|
||||
@ -74,13 +74,11 @@ function computeFolderInfo(
|
||||
userOpts?: Partial<FolderPageOptions>,
|
||||
): Record<SimpleSlug, ProcessedContent> {
|
||||
// Fail fast if global folder slug conflicts with existing folders
|
||||
const globalFolderSlug = userOpts?.globalFolderTitle?.toLowerCase()
|
||||
.replaceAll(" ", "-") as SimpleSlug ?? null
|
||||
const globalFolderSlug =
|
||||
(userOpts?.globalFolderTitle?.toLowerCase().replaceAll(" ", "-") as SimpleSlug) ?? null
|
||||
if (globalFolderSlug) {
|
||||
if (folders.has(globalFolderSlug)) {
|
||||
throw new Error(
|
||||
`Global folder path "${globalFolderSlug}" conflicts with existing folder's.`,
|
||||
)
|
||||
throw new Error(`Global folder path "${globalFolderSlug}" conflicts with existing folder's.`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user