N
Nuxt2mo ago
ManUtopiK

Programmatically refresh nuxt-content generated pages ?

We can run a nuxt-content website in a cloud runner like Vercel with the edge-rendering mode : https://nuxt.com/docs/guide/concepts/rendering#edge-side-rendering With this mode, we can provide API route. What I try to do is to provide a /api/gitlab/webhook route that will be triggered by a gitlab webhook when a push is made to the repository. Vercel can already rebuild the site when a push is made with a gitlab webhook, but Vercel re-install the packages and simply do a pnpm build. As the server is running, I wonder if we can just rebuild the generated pages, and assets, not rebuilding the entire site ?
Nuxt
Rendering Modes · Nuxt Concepts
Learn about the different rendering modes available in Nuxt.
1 Reply
ManUtopiK
ManUtopiK2mo ago
Here a file on how I refresh the data : https://gist.github.com/ManUtopiK/84580cd8fd9e135eb5d5e1901403a4d4 It's very experimental. It doesn't handle assets. I wonder If there is another way to do that ? Any idea ?
Gist
Gitlab webhook to refresh nuxt-content
Gitlab webhook to refresh nuxt-content. GitHub Gist: instantly share code, notes, and snippets.
Want results from more Discord servers?
Add your server