@quartz-community/tag-page 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 56dd9d8: The manifest declares the `prefixTags` option (default `false`), so option checks and Quartz Syncer know it.
8
+
3
9
  ## 1.0.4
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -5,35 +5,44 @@ Renders tag pages showing all content tagged with a specific tag. Automatically
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npx quartz plugin add github:quartz-community/tag-page
8
+ npx quartz plugin add @quartz-community/tag-page
9
9
  ```
10
10
 
11
+ Tag pages are already in Quartz's default configuration.
12
+
11
13
  ## Usage
12
14
 
13
15
  ```yaml title="quartz.config.yaml"
14
16
  plugins:
15
- - source: github:quartz-community/tag-page
17
+ - source: "@quartz-community/tag-page"
16
18
  enabled: true
19
+ options:
20
+ numPages: 10
21
+ prefixTags: false
17
22
  ```
18
23
 
19
- For advanced use cases, you can override in TypeScript:
24
+ `sort` takes a function, so it needs a TypeScript override:
20
25
 
21
26
  ```ts title="quartz.ts (override)"
22
27
  import * as ExternalPlugin from "./.quartz/plugins";
23
28
 
24
29
  ExternalPlugin.TagPage({
25
30
  numPages: 10,
26
- prefixTags: false,
31
+ sort: (f1, f2) => (f1.frontmatter?.title ?? "").localeCompare(f2.frontmatter?.title ?? ""),
27
32
  });
28
33
  ```
29
34
 
30
35
  ## Configuration
31
36
 
32
- | Option | Type | Default | Description |
33
- | ------------ | --------- | ----------- | ------------------------------------------------------------------------------- |
34
- | `sort` | `SortFn` | `undefined` | A function to sort the pages with the tag. |
35
- | `numPages` | `number` | `undefined` | The number of pages to show per tag page. |
36
- | `prefixTags` | `boolean` | `false` | Whether to prefix generated tag page titles with "Tag: " (e.g. "Tag: recipes"). |
37
+ | Option | Type | Default | Description |
38
+ | ------------ | --------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | `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. |
40
+ | `prefixTags` | `boolean` | `false` | Whether to prefix generated tag page titles with the localized "Tag" label (e.g. "Tag: recipes"). |
41
+ | `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. |
42
+
43
+ `numPages` and `sort` take effect since version 1.0.4.
44
+
45
+ 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.
37
46
 
38
47
  ## Documentation
39
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quartz-community/tag-page",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Tag page type plugin for Quartz.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -102,11 +102,15 @@
102
102
  "defaultOrder": 50,
103
103
  "defaultEnabled": true,
104
104
  "defaultOptions": {
105
- "numPages": 10
105
+ "numPages": 10,
106
+ "prefixTags": false
106
107
  },
107
108
  "optionSchema": {
108
109
  "numPages": {
109
110
  "type": "number"
111
+ },
112
+ "prefixTags": {
113
+ "type": "boolean"
110
114
  }
111
115
  }
112
116
  },