diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/next.config.mjs b/next.config.mjs index 4678774..6104006 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,20 @@ +const isGithubActions = process.env.GITHUB_ACTIONS || false; + +let assetPrefix = ""; +let basePath = ""; + +if (isGithubActions) { + const repo = process.env.GITHUB_REPOSITORY.replace(/.*?\//, ""); + + assetPrefix = `/${repo}/`; + basePath = `/${repo}`; +} + /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + assetPrefix, + basePath, + output: "export", // Ensure this line is present +}; -export default nextConfig; +module.exports = nextConfig; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..e59724b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}