@karaoke-cms/module-tags 0.13.0 → 0.15.0
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/README.md +61 -0
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @karaoke-cms/module-tags
|
|
2
|
+
|
|
3
|
+
Tags module for karaoke-cms — cross-collection tag index with per-tag RSS feeds. Aggregates tags from your blog and all active docs sections automatically.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @karaoke-cms/module-tags
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// karaoke.config.ts
|
|
15
|
+
import { defineConfig } from '@karaoke-cms/astro';
|
|
16
|
+
import { tags } from '@karaoke-cms/module-tags';
|
|
17
|
+
|
|
18
|
+
export default defineConfig({
|
|
19
|
+
// ...
|
|
20
|
+
modules: [tags()],
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
No options required. Once added, your site gets `/tags`, `/tags/[tag]`, and `/tags/[tag]/rss.xml` automatically.
|
|
25
|
+
|
|
26
|
+
## Configuration
|
|
27
|
+
|
|
28
|
+
| Option | Type | Default | Description |
|
|
29
|
+
|--------|------|---------|-------------|
|
|
30
|
+
| `mount` | `string` | `'/tags'` | URL prefix for all tag routes |
|
|
31
|
+
| `enabled` | `boolean` | `true` | Set `false` to disable without removing from config |
|
|
32
|
+
|
|
33
|
+
## Routes
|
|
34
|
+
|
|
35
|
+
| Pattern | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `/tags` | All-tags listing — every tag with post count |
|
|
38
|
+
| `/tags/[tag]` | Posts and docs matching a single tag |
|
|
39
|
+
| `/tags/[tag]/rss.xml` | RSS feed for a single tag |
|
|
40
|
+
|
|
41
|
+
## Frontmatter
|
|
42
|
+
|
|
43
|
+
Tags are read from the `tags` field on blog posts and docs pages:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
---
|
|
47
|
+
title: My Post
|
|
48
|
+
publish: true
|
|
49
|
+
tags: [javascript, tutorial]
|
|
50
|
+
---
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
No additional frontmatter fields are added by this module.
|
|
54
|
+
|
|
55
|
+
## What's new in 0.13.1
|
|
56
|
+
|
|
57
|
+
No user-facing changes in this release.
|
|
58
|
+
|
|
59
|
+
## What's new in 0.13.0
|
|
60
|
+
|
|
61
|
+
- **Initial release** — `/tags`, `/tags/[tag]`, and per-tag RSS feeds; aggregates tags from blog and all active docs sections automatically; `mount` and `enabled` options
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karaoke-cms/module-tags",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"description": "Tags module for karaoke-cms — cross-collection tag index with per-tag RSS feeds",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"exports": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"astro": ">=6.0.0",
|
|
28
|
-
"@karaoke-cms/contracts": "^0.
|
|
29
|
-
"@karaoke-cms/astro": "^0.
|
|
28
|
+
"@karaoke-cms/contracts": "^0.15.0",
|
|
29
|
+
"@karaoke-cms/astro": "^0.15.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"astro": "^6.0.8",
|
|
33
33
|
"vitest": "^4.1.1",
|
|
34
|
-
"@karaoke-cms/astro": "0.
|
|
35
|
-
"@karaoke-cms/contracts": "0.
|
|
34
|
+
"@karaoke-cms/astro": "0.15.0",
|
|
35
|
+
"@karaoke-cms/contracts": "0.15.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"test": "vitest run test/module-tags.test.js"
|