Join the Webstudio community

Updated last week

How to integrate a new CMS

Can you point me in the right direction for information on integrating a new CMS? I've got a graphql API (that can be tweaked if needed) that I'm confident I can get working with the query playground (looks like GraphiQL).

Specifically I'm wondering about the mechanism for pushing content updates from the CMS. Is there a webhook or something to notify Web Studio that there is a new item in a collection? Or does Web Studio fetch each collection periodically for updates? Or does Web Studio fetch the collection from the external CMS every time it needs it (so it is always fresh)? ...I have questions like this.

Thanks for your help. Any additional resources would be great.
-Stefan
J
S
O
13 comments
Hey it fetches it in real time so no need to touch Webstudio when you make content updates.

The doc is a good place to start. It also has linked video. I recommend watching one of the lengthier tutorials all the way through https://docs.webstudio.is/university/foundations/cms
Just curious, which CMS are you using?
We have a fork of https://www.refinerycms.com/ (forked many years ago) that is the foundation for our platform https://tilmaplatform.com/parish.
Yes, I was looking through https://docs.webstudio.is/university/foundations/cms and from a first look it all looks doable. My biggest question was just about what I asked above. So all dynamic content on the Web Studio page will be fetched realtime to the external CMS for every page view? (no caching?)
there is caching
Right, I saw mention of CF workers. So you (Web Studio) are using CF workers, but could I get a high level idea of what they are doing for you? Is there a TTL it maintains so when there is an update in the CMS, the TTL expires (30s? 5min? 15min?) and then the latest content is fetched?
It respects the origin's cache control so what I'd do is make a request with a tool that lets you see the headers and inspect them to see what your origin is allowing
If you can configure the origin's cache policy then I recommend doing that
Or you can setup a cloudflare proxy that set custom cache control there
Right, that makes sense that it would just follow the origin cache control headers. Though you must be doing something a little more advanced than that with GraphQL as it is POST requests with the query in the body. As far as I know, http cache control headers don't play well with that. (and from playing around with web studio, the rendering seems too snappy to be going out to our [somewhat slow] origin server). Is there some more advanced/custom caching you're already doing with GraphQL requests? Using stale data and revalidating it (??).
Nothing special. Just what I linked.
Add a reply
Sign up and join the conversation on Discord