diff --git a/src/app/(static)/t/[tag]/page.tsx b/src/app/(static)/t/[tag]/page.tsx index aa8633a4..b327c8fc 100644 --- a/src/app/(static)/t/[tag]/page.tsx +++ b/src/app/(static)/t/[tag]/page.tsx @@ -1,6 +1,7 @@ import { getPhotosCached } from '@/cache'; import SiteGrid from '@/components/SiteGrid'; import PhotoGrid from '@/photo/PhotoGrid'; +import { getUniqueTags } from '@/services/postgres'; import { absolutePathForTag, absolutePathForTagImage } from '@/site/paths'; import { descriptionForTaggedPhotos, titleForTag } from '@/tag'; import TagHeader from '@/tag/TagHeader'; @@ -10,6 +11,13 @@ interface TagProps { params: { tag: string } } +export async function generateStaticParams() { + const tags = await getUniqueTags(); + return tags.map(tag => ({ + params: { tag }, + })); +} + export async function generateMetadata({ params: { tag }, }: TagProps): Promise {