20 lines
700 B
TypeScript
20 lines
700 B
TypeScript
import TaxonomyTable from "@/components/TaxonomyTable";
|
|
import { categoryCounts, readPosts } from "@/lib/store";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function CategoriesPage() {
|
|
const { posts, revision } = await readPosts();
|
|
return (
|
|
<main>
|
|
<h1>Categories</h1>
|
|
<p className="muted">
|
|
Each post has exactly one category. Categories come from the posts themselves: create one by
|
|
typing it into a post's category field, and it disappears once no post uses it. Rename to an
|
|
existing category to merge the two.
|
|
</p>
|
|
<TaxonomyTable kind="category" items={categoryCounts(posts)} revision={revision} />
|
|
</main>
|
|
);
|
|
}
|