mirror of
https://github.com/quartz-community/tag-page.git
synced 2026-11-17 00:13:32 +00:00
Quartz's default tag page plugin.
- TypeScript 98.6%
- SCSS 1.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .changeset | ||
| .github/workflows | ||
| src | ||
| test | ||
| types | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@quartz-community/tag-page
Renders tag pages showing all content tagged with a specific tag. Automatically generates virtual pages for all tags found across content.
Installation
npx quartz plugin add @quartz-community/tag-page
Tag pages are already in Quartz's default configuration.
Usage
plugins:
- source: "@quartz-community/tag-page"
enabled: true
options:
numPages: 10
prefixTags: false
sort takes a function, so it needs a TypeScript override:
import * as ExternalPlugin from "./.quartz/plugins";
ExternalPlugin.TagPage({
numPages: 10,
sort: (f1, f2) => (f1.frontmatter?.title ?? "").localeCompare(f2.frontmatter?.title ?? ""),
});
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
numPages |
number |
10 |
On the tag index page (/tags), the maximum number of pages listed under each tag; a tag's own page lists all of them. |
prefixTags |
boolean |
false |
Whether to prefix generated tag page titles with the localized "Tag" label (e.g. "Tag: recipes"). |
sort |
SortFn |
folders first, then date, title | A function (f1, f2) => number to sort the pages with the tag. By default: folders first, then newest first, then by title. Requires a TS override. |
numPages and sort take effect since version 1.0.4.
A page with a nested tag such as #project/alpha is listed under both project/alpha and project. Writing a note at tags/<tag>.md adds your own text above the generated listing.
Documentation
See the Quartz documentation for more information.
License
MIT