From 414e064ad089176a6e3b92ec7ae96e99718fb8c7 Mon Sep 17 00:00:00 2001 From: Max Wolfs Date: Fri, 11 Oct 2024 11:36:21 +0200 Subject: [PATCH] add static export config Signed-off-by: Max Wolfs --- next.config.mjs | 10 ++++++++++ package.json | 13 +++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index e75be84..2960bae 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,10 +1,20 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + + // For static export and i18n configuration i18n: { locales: ['de', 'en'], defaultLocale: 'en', }, + + // These settings are important for GitHub Pages + basePath: '/sovereigncloudstack.org', // Replace with your repository name + assetPrefix: '/sovereigncloudstack.org/', // Replace with your repository name + trailingSlash: true, // Adds trailing slash to every route to work with GitHub Pages + + // Optional: Disable server-side rendering completely to ensure static export + output: 'export', // Enable static export }; export default nextConfig; diff --git a/package.json b/package.json index 7573267..13bcecb 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,13 @@ "name": "sovereigncloudstack.org", "version": "0.1.0", "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, +"scripts": { + "dev": "next dev", + "build": "next build", + "export": "next export", + "start": "next start", + "lint": "next lint" +}, "dependencies": { "@emotion/react": "^11.11.4", "@types/d3": "^7.4.3",