Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback for “Nextra” #3048

Open
Leonardo7 opened this issue Jul 22, 2024 · 0 comments
Open

Feedback for “Nextra” #3048

Leonardo7 opened this issue Jul 22, 2024 · 0 comments

Comments

@Leonardo7
Copy link

I have a problem in my nextra project, when I want to add it as an application in IIS and do the build to the project, the html, css and js are created unformatted (the code in one line) and when I format it the src and the href are generated in this way:

<script src="/_next/static/gFTOU9sFvuV2s8Y2cTJ0s/_ssgManifest.js" defer=""></script>

and when I remove the first diagonal, it already detects the file, but I don't know if I'm doing the configuration wrong or how I can solve it.
next.config.js
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx',
unstable_staticImage: false
})

const path = require('path');

module.exports = withNextra({
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
output: 'export',
images: {
unoptimized: true,
},
trailingSlash: true,
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '/out',
assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH || '/out'
});

package.json
{
"name": "doc-crossmotion",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"export": "next export",
"lint": "next lint"
},
"dependencies": {
"next": "14.2.3",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}

I don't know if there is a step-by-step guide on how to do a build to generate static documents correctly, with the correct redirects so that there is no problem when implementing it in IIS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant