Content adapters for use with sanity.io

Hi folks,

I’ve been using Hugo for close to a decade now - personal websites, business websites, and the last couple of years even small e-commerce stores. Started off with hosting from GCS buckets and moved on to Cloudflare Pages.

The past couple of years I’ve been helping a non-profit build and maintain a website. As I try to focus on managing the site functionality, I try to reduce my involvement with managing content. So I started using sanity.io as a CMS for others to easily manage content. It’s straightforward for known sets of pages and works very well.

I’m now at a point where I want to generate pages dynamically based off of data in sanity, think a webstore with multiple product pages; and I’ve been delighted to learn of content-adapters, which seem to provide the functionality I need.

Question for the community - has anyone already attempted this with sanity? Looking for some prior art, some basic scaffolding to get started. I can probably figure it all out, but it would be very helpful to have something to start with.

1 Like

I don’t know, but I don’t think it should be too hard (and if it’s too hard, please let me know).

A related tip would be to configure the HTTP cache:

Which should enable good “edit on sanity” and preview in Hugo server workflow.