Next.js blog with Hygraph GraphQL, a hand-rolled AST renderer, and AdSense monetisation

The personal Next.js blog used Sanity for content management. It worked technically but the editing experience was structured-form input — correct for typed data, wrong for writing. Writing a blog post in Sanity feels like filling out a database entry. My brother needed a blog and I was looking for a CMS that treated writing more like writing.
Hygraph offers a different model: GraphQL-first, with a rich-text field that stores content as an AST rather than raw HTML or Markdown. The schema design is still structured, but the editing interface is closer to a document editor. Worth testing against the Sanity experience to see if the trade felt different in practice.
Hygraph's rich-text fields return a node tree — an AST with typed nodes for headings, paragraphs, lists, code blocks, images, and embeds. Most projects reach for a third-party rich-text renderer that walks this tree and produces React elements. I built the renderer from scratch.
The reason: third-party renderers make styling decisions that fight your design system. A heading rendered by someone else's library arrives with opinions about class names or inline styles that you then have to override. Writing the renderer gives you complete control — each node type maps to exactly the React element and className you want. 1,279 lines of code, four days, AST renderer included.
AdSense integration sat on top of this: display ads on post pages, wired through the Google AdSense script inject. The combination gave my brother a monetised blog with a GraphQL content backend in a week.
The Hygraph editing experience was better than Sanity for long-form content — less structured-form, more document-oriented. But the fundamental verdict was the same: a hosted GraphQL CMS is the right tool for teams with a content operation, not for a solo writer who wants to open a tab and type. The blog worked. The editing workflow still had enough friction that my brother wasn't comfortable using it independently.
That verdict is what drove the third iteration toward headless WordPress — an editing experience that writers already know, backed by the most mature CMS ecosystem that exists. The Hygraph iteration was necessary to surface the actual constraint: the problem wasn't the data layer, it was the authoring surface.
Headless WordPress blog with Faust.js, WPGraphQL, Apollo, Tiptap editor, and self-hosted Coolify deployment
Personal blog with Sanity CMS, SWR infinite pagination, and Bootstrap 4 styling
Sanity v2 Content Studio with custom schema design for a structured blogging CMS
Did this resonate?