| | |
| | | import { FullSlug, resolveRelative } from "../util/path" |
| | | import { QuartzPluginData } from "../plugins/vfile" |
| | | import { Date, getDate } from "./Date" |
| | | import { QuartzComponentProps } from "./types" |
| | | import { QuartzComponent, QuartzComponentProps } from "./types" |
| | | import { GlobalConfiguration } from "../cfg" |
| | | |
| | | export function byDateAndAlphabetical( |
| | |
| | | limit?: number |
| | | } & QuartzComponentProps |
| | | |
| | | export function PageList({ cfg, fileData, allFiles, limit }: Props) { |
| | | export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit }: Props) => { |
| | | let list = allFiles.sort(byDateAndAlphabetical(cfg)) |
| | | if (limit) { |
| | | list = list.slice(0, limit) |
| | |
| | | <div class="section"> |
| | | {page.dates && ( |
| | | <p class="meta"> |
| | | <Date date={getDate(cfg, page)!} /> |
| | | <Date date={getDate(cfg, page)!} locale={cfg.locale} /> |
| | | </p> |
| | | )} |
| | | <div class="desc"> |