Forum
Using Runway as Headless CMS and static site generators
Hi, I'm looking into the option of building a site using a static site generator (Gatsby) and pairing it with Runway as a Headless CMS. However, the sticking point is going be rebuilding the static site, and then publishing it when the user updates the content in the Perch backend. Anyone any experience of this? I fear there's no simple solution to this out there at the moment.
If not I may either have to build the site using Headless Runway with next.js or similar - or use a CMS that has this built in (such as Netlify CMS). I'd really rather not have to get to know another CMS having worked with Perch for years (whilst loving it) so hoping there may be a solution or pointers out there to assist!
Drew / Rachel is there anything in the pipeline at all for this? Guessing it's not such a requested feature, but the JAMstack seems to be gaining traction so may be requested more in the future?
Thanks.
Could you listen for one of the publish events and then trigger your build? https://docs.grabaperch.com/api/events/list/
Maybe, way out of my comfort zone though! I'll take a look if I have spare time. I'll go down the next.js route for now.
Just a quick one on Headless Runway, am I right in assuming that all content that is available on a normal Perch Runway site is available via the API? Docs only really mention Collections, but I assume Pages and their regions are also gettable?
So where we use 'ContentCollections' in
is there a list of the other available parameters here?
You can use
$API->get('ContentRegions')
to work with regular content regions.An example might be:
You can check also https://www.codigeeks.com