Skip to content

.nojekyll isn't created when running generate command with github preset #21232

@Lehoczky

Description

@Lehoczky

Environment

  • Operating System: Windows_NT
  • Node Version: v16.17.1
  • Nuxt Version: 3.5.1
  • Nitro Version: 2.4.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: nitro
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/Lehoczky/github-preset-nojekyll-repro

Describe the bug

Bug description: .nojekyll file is not generated when running pnpm generate

Repro Steps:

  • run pnpm generate in the reproduction project
  • inside the .output/public folder the .nojekyll is missing
    image

However running pnpm build works, in this case the .nojekyll file is being generated.
image

Additional context

I think people who use the gh-pages preset all want to generate a static site and therefore use the pnpm generate command to prerender every page.

Ideally nitro (or nuxt) should show a warning or an error when the user uses a preset that is defined as static or set the --prerender option to true even when the project is built with the pnpm build command.

In case I missed something, would there be any reason for someone not to build a static preset with prerendering?

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions