Tags Module
The tags module creates a tag index at /tags that aggregates tags from all content — blog posts and every active docs section. Each tag gets its own page listing all matching content, plus an RSS feed.
Adding the tags module
In karaoke.config.ts:
import { defineConfig } from '@karaoke-cms/astro';
import { blog } from '@karaoke-cms/module-blog';
import { docs } from '@karaoke-cms/module-docs';
import { tags } from '@karaoke-cms/module-tags';
import { themeDefault } from '@karaoke-cms/theme-default';
export default defineConfig({
vault: env.KARAOKE_VAULT,
title: 'My Site',
theme: themeDefault(),
modules: [
blog(),
docs(),
tags(),
],
});
Options
| Option | Default | Description |
|---|---|---|
mount | /tags | URL prefix for tag routes |
enabled | true | Set false to exclude from the build |
tags({
mount: '/tags',
enabled: true,
})
The mount path cannot be / or empty — it must be a non-root path.
Routes injected
| Route | Description |
|---|---|
/tags | Tag index — all tags with post counts |
/tags/[tag] | Per-tag page listing all content with that tag |
/tags/[tag]/rss.xml | Per-tag RSS feed |
Adding tags to content
Add a tags list to any blog post or docs page frontmatter:
---
title: "My Post"
publish: true
date: 2024-03-15
tags: [astro, obsidian, static-sites]
---
Tags work across all content types. If the same tag appears in a blog post and a docs page, both show up on the same tag page at /tags/[tag].
No configuration needed
The tags module automatically discovers tags from all active blog and docs collections. There is no sources config — it finds tags wherever they appear across your content.
Adding a new tag is as simple as adding it to a page’s frontmatter. The tag index and per-tag pages are generated at build time from whatever tags exist in your content.