We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
nitro 2.9.5
In nitro.config.ts
nitro.config.ts
export default defineNitroConfig({ srcDir: "server", preset: "github-pages" });
https://codesandbox.io/p/github/unjs/nitro/csb-rqd4sc/draft/old-sky?file=%2Fnitro.config.ts%3A6%2C1
nitro build with "github-pages" preset doesn't prerender index.html file like with the "static" preset which doesn't seem to be intended behaviour. this is due to github pages preset adding 404.html route in prerender object https://github.com/unjs/nitro/blob/eb377abf3332f431b388d3fa53b2c8786f832183/src/presets/github-pages.ts#L10-L15
nitro build
index.html
404.html
this check is no longer true https://github.com/unjs/nitro/blob/2bce7adafd988ffef186b70012a4b45087f11ca5/src/prerender.ts#L40-L43
so index.html doesn't get prerendered
manually adding "/" to routes array should fix this but maybe there's a better solution
No response
The text was updated successfully, but these errors were encountered:
please share a runnable reproduction
Sorry, something went wrong.
here you are https://codesandbox.io/p/github/unjs/nitro/csb-rqd4sc/draft/old-sky?file=%2Fnitro.config.ts%3A6%2C1
Thanks for repro. Feel free to make a PR for adding / by default for github-pages 👍🏼
/
github-pages
Successfully merging a pull request may close this issue.
Environment
nitro 2.9.5
Reproduction
In
nitro.config.ts
https://codesandbox.io/p/github/unjs/nitro/csb-rqd4sc/draft/old-sky?file=%2Fnitro.config.ts%3A6%2C1
Describe the bug
nitro build
with "github-pages" preset doesn't prerenderindex.html
file like with the "static" preset which doesn't seem to be intended behaviour.this is due to github pages preset adding
404.html
route in prerender objecthttps://github.com/unjs/nitro/blob/eb377abf3332f431b388d3fa53b2c8786f832183/src/presets/github-pages.ts#L10-L15
this check is no longer true
https://github.com/unjs/nitro/blob/2bce7adafd988ffef186b70012a4b45087f11ca5/src/prerender.ts#L40-L43
so
index.html
doesn't get prerenderedAdditional context
manually adding "/" to routes array should fix this but maybe there's a better solution
Logs
No response
The text was updated successfully, but these errors were encountered: