-
Notifications
You must be signed in to change notification settings - Fork 514
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
allow excluding routes from prerenderer crawling #308
Comments
@pi0 What are your thoughts regarding implementation ? Let me know if I can help :) |
Sure makes sense to introduce an option (array) filtering exact URLs for patterns with (off topic) BTW I can see this is linked to kevinmarrec/nuxt-pwa-module#7. The module should probably use a server handler to generate manifest which then works with nitro :) We can also improve the crawler to avoid overriding already written (public) assets. I wouldn't use feature from this issue for working around. |
One thing I do like about the Next implementation is that you can specify on the page component whether it should be prerendered or not. Did you consider something like this on the template or script tag? eg: <template static>
</template> This would prevent complex rules that people would have to learn. Maybe even make it work so it applies the setting to any nested pages (for example on a blog page and that all of its article detail pages automatically would have static generation applied) |
@chris-visser This is possible to be done using unified route rules to specify group of routes to be static cached (prerenderd) |
Wauw nice! Have a lot of catching up to do with all of Nuxt 3's features, but honestly great stuff! |
Seems like simple string filtering is supported with commit a6cbbbe and the |
I now have a need to exclude all routes except several routes to be prerendered. But plain string prefix won't work for me, neither will |
Just started testing pre-rendering and route rules but they do not feel intuitive to me, especially when crawling is on it means I have to duplicate route logic. Thoughts on using E.g. to prerender articles: |
I believe this is possible with routeRules and |
|
Would be nice if something is intended to be dynamic.
Perhaps we could support
prerender.exclude
with RegExp, function or string signature? Or a render hook with option to skip rendering (#88)?The text was updated successfully, but these errors were encountered: