1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2025-07-22 14:21:24 +00:00
Files
.github
content
docs
advanced
features
Citations.md
Docker Support.md
Latex.md
Mermaid diagrams.md
Obsidian compatibility.md
OxHugo compatibility.md
RSS Feed.md
Roam Research compatibility.md
SPA Routing.md
backlinks.md
breadcrumbs.md
callouts.md
comments.md
darkmode.md
explorer.md
folder and tag listings.md
full-text search.md
graph view.md
i18n.md
index.md
popover previews.md
private pages.md
reader mode.md
recent notes.md
social images.md
syntax highlighting.md
table of contents.md
upcoming features.md
wikilinks.md
images
plugins
tags
authoring content.md
build.md
configuration.md
hosting.md
index.md
layout-components.md
layout.md
migrating from Quartz 3.md
philosophy.md
setting up your GitHub repository.md
showcase.md
upgrading.md
quartz
.gitattributes
.gitignore
.gitlab-ci.yml
.gitmodules
.node-version
.npmrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
Dockerfile
LICENSE.txt
README.md
bun.lock
globals.d.ts
index.d.ts
package-lock.json
package.json
quartz.config.ts
quartz.layout.ts
tsconfig.json
brain-quartz/docs/features/recent notes.md
Yohann Bacha 81a4e20236 feat: ability to hide tags in the recent notes component ()
* feat: ability to hide tags in the recent notes component

* docs: recent notes custom parameters in a table

* docs: revert recent notes doc to bullet points

* fix: linter issues

* Update docs/features/recent notes.md

---------

Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
2024-05-21 09:50:58 -07:00

18 lines
1.5 KiB
Markdown

---
title: Recent Notes
tags: component
---
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`. See `byDateAndAlphabetical` in `quartz/components/PageList.tsx` for an example.
- Component: `quartz/components/RecentNotes.tsx`
- Style: `quartz/components/styles/recentNotes.scss`