Separate YouTube video titles from on-video song/artist fields with Pro gating, serve curated fonts and watermark assets for 1:1 preview parity, and include billing/API/docs/deploy stack for self-hosted release.
43 lines
892 B
TypeScript
43 lines
892 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
function resolveDocsUrl(): string {
|
|
if (process.env.NEXT_PUBLIC_DOCS_URL?.trim()) {
|
|
return process.env.NEXT_PUBLIC_DOCS_URL.replace(/\/$/, "");
|
|
}
|
|
const auth = process.env.NEXTAUTH_URL ?? "";
|
|
if (/localhost|127\.0\.0\.1/i.test(auth)) {
|
|
return "http://localhost:3001";
|
|
}
|
|
return "https://docs.songs2vid.com";
|
|
}
|
|
|
|
const apiDocsUrl = `${resolveDocsUrl()}/docs/api/overview`;
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "images.unsplash.com",
|
|
},
|
|
],
|
|
},
|
|
experimental: {
|
|
serverActions: {
|
|
bodySizeLimit: "32mb",
|
|
},
|
|
},
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/dashboard/api-docs",
|
|
destination: apiDocsUrl,
|
|
permanent: false,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|