0

I have a CMS like system where I can design a website and publish it to a S3 bucket. The website is generated with Gridsome. In this CMS I want the options of adding and removing components (such as a title) without rebuilding and redeploying the website.

Also I am looking at headless CMS systems and Contentful so I can edit content and retrieve it in the Gridsome website. What I want to achieve is that I can edit the content from the website without rebuilding and redeploying the website.

I am currently looking at Contentful or GraphCMS to solve the content part, but it still does not solve changing the content dynamically without rebuilding/redeploying. For the components I am looking at Webpack's code splitting but then I still have to rebuild the entire site instead of the modified component.

Is this feasible/possible?

Thijs
  • 33
  • 5

1 Answers1

0

S3 is a static file storage which means that your options to render your website without redeploying are limited. Additionally, I think that a Gridsome site should be redeployed after content updates.

To make it dynamic though I see two options:

Render dynamic parts of your website in the client (browser)

If you don't want to redeploy the site, then you have to figure out how to make parts of the site dynamic. These dynamic parts then would have to fetch the data from your headless CMS.

Making components depend on external APIs and JavaScript, in general, makes you lose big benefits of static sites though – you'd lose the fast performance of static HTML and that static sites "just work" (no matter if JS is available or not).

I'm not sure how to bring in dynamic data fetching into Gridsome but I assume that this approach is a little bit against the idea of Gridsome. AFAIK Gridsome is a static site generator that fetches all the needed data during build time and then makes this 3rd party data available via it's own data layer.

Move away from s3 and use a dynamic server

This probably doesn't work with Gridsome...

Another approach would be to use a server that fetches the data whenever a request comes in. This way you wouldn't need to redeploy when data in your CMS changes.

To cut things short – I think if you want to go with Gridsome the best approach is to redeploy after a content update. :)

stefan judis
  • 3,416
  • 14
  • 22