Statically generate photo pages
This commit is contained in:
parent
97bc58bd8a
commit
62f5a1ec7f
@ -8,8 +8,14 @@ import { redirect } from 'next/navigation';
|
||||
import { absolutePathForPhoto, absolutePathForPhotoImage } from '@/site/paths';
|
||||
import PhotoDetailPage from '@/photo/PhotoDetailPage';
|
||||
import { getPhotoCached, getPhotosCached } from '@/cache';
|
||||
import { getPhotos } from '@/services/postgres';
|
||||
|
||||
export const runtime = 'edge';
|
||||
export async function generateStaticParams() {
|
||||
const photos = await getPhotos();
|
||||
return photos.map(photo => ({
|
||||
slug: photo.id,
|
||||
}));
|
||||
}
|
||||
|
||||
export async function generateMetadata({
|
||||
params: { photoId },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user