diff --git a/apps/docs/.gitignore b/apps/docs/.gitignore index f706b7c..7fd02d6 100644 --- a/apps/docs/.gitignore +++ b/apps/docs/.gitignore @@ -26,4 +26,9 @@ yarn-error.log* # others .env*.local .vercel -next-env.d.ts \ No newline at end of file +next-env.d.ts + +# cloudflare / opennext +/.open-next/ +/.wrangler/ +cloudflare-env.d.ts \ No newline at end of file diff --git a/apps/docs/lib/github.ts b/apps/docs/lib/github.ts index 9a11690..76a8aaf 100644 --- a/apps/docs/lib/github.ts +++ b/apps/docs/lib/github.ts @@ -7,9 +7,10 @@ export type RepoStats = { async function fetchJson(url: string): Promise | null> { try { + // 构建期取一次并静态化;数据随每次部署更新,运行时无需 ISR 缓存设施 const res = await fetch(url, { headers: { Accept: 'application/vnd.github+json' }, - next: { revalidate: 3600 }, + cache: 'force-cache', }); if (!res.ok) return null; return (await res.json()) as Record; diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 457dcf2..5ff8f4f 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -5,6 +5,11 @@ const withMDX = createMDX(); /** @type {import('next').NextConfig} */ const config = { reactStrictMode: true, + images: { + // 站内图片均为已按展示尺寸截取的静态资源,直接由 CDN 提供, + // 避免在 Cloudflare Workers 上依赖运行时图片优化服务。 + unoptimized: true, + }, }; export default withMDX(config); diff --git a/images/en-brand.png b/images/en-brand.png index 00a855b..88e820c 100644 Binary files a/images/en-brand.png and b/images/en-brand.png differ diff --git a/images/en-home.png b/images/en-home.png index 5930f53..a1cdd96 100644 Binary files a/images/en-home.png and b/images/en-home.png differ diff --git a/images/en-model.png b/images/en-model.png index 14743dd..52d0ed3 100644 Binary files a/images/en-model.png and b/images/en-model.png differ