1

Sometimes you have unfinished pages you don't want to make publicly available yet but you still want to publish the rest of your work.

You can either strictly work with feature branches, or you rename your page file ending into something like .txt, or you move them out of the pages directory.

Is it somehow possible to disable certain pages of your Nuxt 3 app?

Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
  • Git you need to use git. – Mises Dec 07 '22 at 21:24
  • @Mises thanks, I'm doing that already. But love to hear your opinion: people came to the conclusion that Gitflow should be ditched in favor of trunk based development, which is heavily using feature flags. Let's say I use that, what should I do now with unfinished pages? – Marian Klühspies Dec 08 '22 at 07:14

2 Answers2

2

Have you tried using the .nuxtignore file?

# ignore layout foo.vue
layouts/foo.vue
# ignore layout files whose name ends with -ignore.vue
layouts/*-ignore.vue
# ignore page bar.vue
pages/bar.vue
# ignore page inside ignore folder
pages/ignore/*.vue
# ignore route middleware files under foo folder except foo/bar.js
middleware/foo/*.js
!middleware/foo/bar.js

https://nuxt.com/docs/guide/directory-structure/nuxtignore#nuxt-ignore-file

This seems to fit what you're trying to achieve.

Thibaut Maurice
  • 477
  • 1
  • 8
  • 17
2

you can add this settings file

nuxt.config.ts

  ignore:  [
        'components/web/**/*',
        'pages/auth/**/*',
        'pages/home/**/*',
        'pages/settings/**/*',
      ]