Hi there. I am using the Plasmic CMS, very nice thanks and congrats.
I only have a doubt. I am using the CMS Data Loader component and works perfect but I have question with Server Side Rendering, I always see the data fetching from Client Side and when I request only HTML I can see there is no pre-fetch. Is this behavior ok?
I think I read almost everything related either in Plasmic and Nextjs and I don’t see how to solve it. This worries me because of SEO and related topics.
Hi there! I didn’t really understand, are you using next JS or are you fetching the HTML from the rest api?
If you are using next js, you can follow the quick start here, and it should ensure that you are prefetching the data. Or you can just spin up a new code base using create-plasmic-app and it should just work.
If you are fetching the HTML from the rest api, then you can specify a parameter to make data fashion happen on our servers.
In a nutshell,I always see the CMS Loader fetching the Plasmic CMS content from client -side.
You will know for SEO purposes it need to be server-side pre-fetch data and I am not seeing it. am I right? It supposed to work works with SSR or do you think is more related with Next.js?
I encountered the same problems with the Nextjs page dir. The issue with the CMS component is that it only fetches data on the client-side. What I want to achieve is fetching the data/the content of my component on the server-side so that the HTML is pre-rendered on the server.
Hi, can you give more details, are you using loader or codegen? Are you prefetching the content server side? You can check the following in the docs to validate your implementation
Yes I’m trying to prefetch the content on the server side, I’m currently using headeless api. Whether I use getStaticProps or getServersideProps, it seems like neither has any effect.