| | |
| | | import { ProcessedContent, defaultProcessedContent } from "../vfile" |
| | | import { FullPageLayout } from "../../cfg" |
| | | import path from "path" |
| | | import { FilePath, FullSlug, SimpleSlug, joinSegments, simplifySlug } from "../../util/path" |
| | | import { |
| | | FilePath, |
| | | FullSlug, |
| | | SimpleSlug, |
| | | _stripSlashes, |
| | | joinSegments, |
| | | pathToRoot, |
| | | simplifySlug, |
| | | } from "../../util/path" |
| | | import { defaultListPageLayout, sharedPageComponents } from "../../../quartz.layout" |
| | | import { FolderContent } from "../../components" |
| | | |
| | |
| | | ) |
| | | |
| | | for (const [tree, file] of content) { |
| | | const slug = simplifySlug(file.data.slug!) |
| | | const slug = _stripSlashes(simplifySlug(file.data.slug!)) as SimpleSlug |
| | | if (folders.has(slug)) { |
| | | folderDescriptions[slug] = [tree, file] |
| | | } |
| | |
| | | |
| | | for (const folder of folders) { |
| | | const slug = joinSegments(folder, "index") as FullSlug |
| | | const externalResources = pageResources(slug, resources) |
| | | const externalResources = pageResources(pathToRoot(slug), resources) |
| | | const [tree, file] = folderDescriptions[folder] |
| | | const componentData: QuartzComponentProps = { |
| | | fileData: file.data, |