| | |
| | | import { QuartzComponentConstructor, QuartzComponentProps } from "./types" |
| | | import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" |
| | | import breadcrumbsStyle from "./styles/breadcrumbs.scss" |
| | | import { FullSlug, SimpleSlug, resolveRelative } from "../util/path" |
| | | import { QuartzPluginData } from "../plugins/vfile" |
| | |
| | | // computed index of folder name to its associated file data |
| | | let folderIndex: Map<string, QuartzPluginData> | undefined |
| | | |
| | | function Breadcrumbs({ fileData, allFiles, displayClass }: QuartzComponentProps) { |
| | | const Breadcrumbs: QuartzComponent = ({ |
| | | fileData, |
| | | allFiles, |
| | | displayClass, |
| | | }: QuartzComponentProps) => { |
| | | // Hide crumbs on root if enabled |
| | | if (options.hideOnRoot && fileData.slug === "index") { |
| | | return <></> |
| | |
| | | ) |
| | | } |
| | | Breadcrumbs.css = breadcrumbsStyle |
| | | |
| | | return Breadcrumbs |
| | | }) satisfies QuartzComponentConstructor |