Search code examples
content-management-systemstrapieleventyssg

Eleventy static site generator with strapi CMS


I am new in website development using Static site generator and Cms, I am developing one static website using eleventy SSG and Strapi CMS. All my contents are stored in CMS. (I Assume all you know about SSG and CMS). Now I have doubt about contents, suppose, I update my contents then it will automatically reflect in my static site without restarting eleventy server or should I restart my eleventy server.

In my current project, When I update my contents using CMS, My site not updating their contents but if i restarting my eleventy server then it is updating. Is it right to restart eleventy server after update contents or is there any way available to update contents on website without restarting eleventy server. Please guide me.


Solution

  • SSG involved that content is "statically rendered" to static files. So, you need a mechanism that fetch new content from Strapi and adapt your files or your displayed content. Here are some ways to do it:

    • Restart Eleventy server (but it causes downtimes)
    • Fetch fresh Strapi content using frontend code (but it could be slower and bad for SEO)
    • Do not use SSG if your content is often updated. Prefer more flexible tools like NextJS or Remix that handle SSR or hybrid behavior.s