Quartz can generate a list of recent notes based on some filtering and sorting criteria. Though this component isnāt included in any layout by default, you can add it by using Component.RecentNotes in quartz.layout.ts.
Customization
- Changing the title from āRecent notesā: pass in an additional parameter to
Component.RecentNotes({ title: "Recent writing" }) - Changing the number of recent notes: pass in an additional parameter to
Component.RecentNotes({ limit: 5 }) - Display the noteās tags (defaults to true):
Component.RecentNotes({ showTags: false }) - Show a āsee moreā link: pass in an additional parameter to
Component.RecentNotes({ linkToMore: "tags/components" }). This field should be a full slug to a page that exists. - Customize filtering: pass in an additional parameter to
Component.RecentNotes({ filter: someFilterFunction }). The filter function should be a function that has the signature(f: QuartzPluginData) => boolean. - Customize sorting: pass in an additional parameter to
Component.RecentNotes({ sort: someSortFunction }). By default, Quartz will sort by date and then tie break lexographically. The sort function should be a function that has the signature(f1: QuartzPluginData, f2: QuartzPluginData) => number. SeebyDateAndAlphabeticalinquartz/components/PageList.tsxfor an example. - Component:
quartz/components/RecentNotes.tsx - Style:
quartz/components/styles/recentNotes.scss