Skip to content

Commit d8e4ed3

Browse files
committed
fixed build command
1 parent c719c93 commit d8e4ed3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

next.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const config = {
77
reactStrictMode: true,
88
output: 'export', // Enable static HTML export
99
trailingSlash: true, // Required for static export
10+
basePath: '/docs', // Set base path for the application
11+
assetPrefix: '/docs', // Ensure assets are also prefixed with /docs
1012
images: {
1113
unoptimized: true // Required for static export
1214
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"private": true,
66
"scripts": {
77
"dev": "next dev",
8-
"build": "next build",
8+
"build": "next build && npm run move-assets",
9+
"move-assets": "mkdir -p out/docs/_next && cp -r out/_next/* out/docs/_next/ && rm -rf out/_next",
910
"start": "next start",
1011
"lint:md": "npx markdownlint-cli2 '**/*.md' '#node_modules' '#.github'",
1112
"lint:links": "node check-links.js",

0 commit comments

Comments
 (0)