chore: try fixing compilation on cf

This commit is contained in:
Thomas Camlong
2025-11-17 11:10:16 +01:00
parent 59b8391d03
commit 81d01f8bba
3 changed files with 49 additions and 60 deletions

View File

@@ -2,21 +2,9 @@ import { permanentRedirect, redirect } from "next/navigation"
import { ImageResponse } from "next/og"
import { getCommunityGalleryRecord, getCommunitySubmissionByName, getCommunitySubmissions } from "@/lib/community"
export const runtime = "edge";
export const revalidate = 21600 // 6 hours
export async function generateStaticParams() {
const icons = await getCommunitySubmissions()
const validIcons = icons.filter((icon) => icon.name)
if (process.env.CI_MODE === "false") {
return validIcons.slice(0, 5).map((icon) => ({
icon: icon.name,
}))
}
return validIcons.map((icon) => ({
icon: icon.name,
}))
}
export const size = {
width: 1200,
height: 630,