I have CLS issue for one of the websites that uses DatoCMS for backend content. It happens on this landing site: https://gostinskaoprema.eu. I know exactly what is the reason for the low CLS score but I can not figure out why it happens on this statically generated landing site?
I have already opened a ticket on StackOverflow but got no answers.
Maybe somebody from here can help me understand why I get this layout shift issue. The problem is that few of the sections on the landing site are loaded after the blog section on the bottom of the side. This triggers a big layout shift on page load. I don’t understand why this happens since the entire site is SSG. Shouldn’t all the HTML be available in the landing site after it is generated?
I must be missing something regarding Next.js SSG. When I open the generated index.html file, not all HTML content is present. When page loads it looks like Next.js is injecting these missing sections on the page load… Shouldn’t the entire HTML be statically generated and available in the index.html site? What am I missing or not understanding here?
Thanks,
Primoz