The site now exists in German (at the root, with /impressum and /datenschutz) and English (/en). A request without a language follows the visitor's choice from the language switch, then the browser language, then German; the old English legal addresses move to /en for good. All visible texts are data in src/content/de.ts and en.ts, so components hold none of their own. The header carries a DE/EN switch whose bit curtain covers the page while it is swapped and reopens at the same reading position. Title, description, canonical, hreflang, Open Graph, the share image, the sitemap and the structured data are per language. The privacy notice now describes the cookie that remembers the chosen language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
import withMintelConfig from "@mintel/next-config";
|
|
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const filename = fileURLToPath(import.meta.url);
|
|
const dirname = path.dirname(filename);
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
serverExternalPackages: [
|
|
'canvas',
|
|
'sharp',
|
|
'puppeteer',
|
|
'require-in-the-middle',
|
|
'import-in-the-middle'
|
|
],
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '*.your-objectstorage.com',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'fsn1.your-objectstorage.com',
|
|
},
|
|
],
|
|
},
|
|
// The site is a single page. Old URLs from the previous site lead to it.
|
|
// The language of a request and the legal pages are handled in proxy.ts.
|
|
async redirects() {
|
|
return [
|
|
"/about",
|
|
"/process",
|
|
"/notes/:path*",
|
|
"/book",
|
|
"/contact",
|
|
"/websites",
|
|
"/blog/:path*",
|
|
"/case-studies/:path*",
|
|
"/technologies/:path*",
|
|
"/tags/:path*",
|
|
]
|
|
.map((source) => ({ source, destination: "/", permanent: true }));
|
|
},
|
|
// In Standalone mode, Next.js expects the tracing root to be the monorepo root
|
|
outputFileTracingRoot: path.join(dirname, '../../'),
|
|
};
|
|
|
|
// Clean, standard wrapper application
|
|
const config = withMintelConfig(nextConfig);
|
|
|
|
// Cleanup config to prevent Next.js 16 warnings about deprecated keys
|
|
if (config.serverActions) {
|
|
delete config.serverActions;
|
|
}
|
|
|
|
export default config;
|