mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-12 20:49:53 +08:00
- app/[lang]/about/page.tsx renders en, zh and ja (zh-Hant falls back
to zh) from one JSX tree with per-language texts and generateMetadata;
delete the cn/ and ja/ copies and redirect their old URLs
- app/[lang]/layout.tsx: use hasLocale, an OG locale table, and real
zh/ja title and description
- components/icons/github.tsx replaces react-icons and lucide's
deprecated Github icon
- quota-limit-toast: read the dictionary keys directly, shadow-float
- Cloudflare: defineCloudflareConfig({}) without R2, no r2_buckets, no
dev-time OpenNext init, cf-typegen script removed,
@opennextjs/cloudflare moves to devDependencies, docs updated
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import type { NextConfig } from "next"
|
|
import packageJson from "./package.json"
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
output: "standalone",
|
|
// Support for subdirectory deployment (e.g., https://example.com/nextaidrawio)
|
|
// Set NEXT_PUBLIC_BASE_PATH environment variable to your subdirectory path (e.g., /nextaidrawio)
|
|
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "",
|
|
env: {
|
|
APP_VERSION: packageJson.version,
|
|
},
|
|
// Include instrumentation.ts in standalone build for Langfuse telemetry,
|
|
// and the shape library docs get_shape_library reads at run time
|
|
outputFileTracingIncludes: {
|
|
"*": ["./instrumentation.ts"],
|
|
"/api/chat": ["./docs/shape-libraries/*.md"],
|
|
},
|
|
// The Chinese and Japanese About pages used to be separate routes
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/:lang/about/cn",
|
|
destination: "/zh/about",
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: "/:lang/about/ja",
|
|
destination: "/ja/about",
|
|
permanent: true,
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|