codeflood logo

Coffee => Coder => Code

Ramblings on code, Sitecore and stuff

Eleventy Nested Pagination

Eleventy (the cool static site generator) has a great feature called Pagination which allows you to iterate over a list of things in chunks and produce multiple output files. As I was migrating this very site over to Eleventy, I found I needed to perform a double pagination. This is when, during paginating over a list of blog post years, I found I wanted to also paginate again over the posts in those years, so I could have at most 20 posts on a single list page.

Sending Email from Cloudflare Pages Functions

In my last post, I mentioned I rebuilt this website using Eleventy. As part of the rebuild I also wanted to modernize my hosting, which previously was a basic cPanel hosting plan with a local Australian hosting provider. My website is statically generated, so the cPanel hosted was fine. Although, I did have one piece of functionality that required server-side logic, and that is the comment...

Eleventy Migration

Back in 2018 I migrated my blog from WordPress to Hexo. Hexo is a static site generator running on Node.js. At the time I chose Hexo because it allowed me complete control over the structure of the resulting website, plus I could override and tweak the markup of the resulting pages. Hexo is a fairly fully-featured static site generator. It has a lot of functionality built into it to cover a lot of...

Experience Edge Schema for Content Hub ONE Tenants

The GraphQL schema used by Content Hub ONE is the same as that used by Content Hub. But there are a few differences between the two systems and the resultant GraphQL schema used by the Experience Edge tenants for these systems. In this post I'm going to explore the key differences you'll find when working with an Experience Edge tenant for each of these systems.

Experience Edge Schema for Content Hub Tenants

Experience Edge hosts tenants for a number of different Sitecore systems including XM, XM Cloud, Content Hub and Content Hub ONE. However, the data models of the Content Hub based systems is different to that of the XM based systems, so each requires a different GraphQL schema to access the content which has been published to Experience Edge. In this post I'm going to explore the GraphQL schema which is generated for a Content Hub tenant.

Experience Edge Schema for XM Tenants

Sitecore Experience Edge is a multi-tenant system hosting tenants for a number of different Sitecore source systems. The data models of each source system are quite different which requires a different schema in the GraphQL API for each kind of source system. In this post I'll be exploring the GraphQL schema used for XM tenants on Experience Edge. This schema is used by XM, XM cloud and managed cloud XM instances.

Using the Experience Edge GraphQL API

Experience Edge is a SaaS offering from Sitecore which allows users to publish content and retrieve it via a globally available GraphQL API. The service takes on the burden of scalability so you don't have to. It provides a buffer between your content delivery applications (statically generated sites (SSG), server side rendered sites (SSR), kiosk applications, mobile applications, etc) and your headless CMS (Content Hub or Sitecore XM/XP) which allows the CMS to go offline for upgrades or maintenance without losing the ability to serve dynamic content.

Why is my Kafka consumer not consuming?

Kafka is a great piece of technology for integrating disparate applications in a decoupled manner. It does however have some nuances which are important to understand. I've been tripped up a few times while doing local development, so I thought I'd write it all down in the hope of saving someone else some frustration.

WeBlog 4.2 Released

WeBlog 4.2 has been released. You'll find the Sitecore packages for various Sitecore versions on the release page at

Unit Testing Sitecore Components Part 5: Recap and Resources

This is the final post in my "Unit Testing Sitecore Components" series. In this series I've taken a seemingly simplistic Sitecore component and refactored it by applying several principals to make the code more reusable and testable. In this final post of the series I'll recap the principals and provide a few resources to help explain them further.

Unit Testing Sitecore Components Part 4: Mocking Items and Fields

In the previous posts of this series, I've refactored an existing Sitecore component to make it's logic more reusable and prepare the component and the logic it includes for unit testing. In this post I'll be writing the unit tests for the refactored EntryTaxonomy class, showing how to mock items and field values.

WeBlog 4.1 Released

WeBlog 4.1 has been released. The main feature of WeBlog 4.1 is support for Sitecore 10.0. You'll find the Sitecore packages for various Sitecore versions on the release page at

Unit Testing Sitecore Components Part 3: Avoid Static Members

In the posts of this series so far, I've refactored a sample view rendering to make the rendering itself unit testable. In doing do I've extracted the business logic to a separate class which still needs some work before it can be properly tested. In this post, I'll be covering 2 more principals to help with making Sitecore components more testable and reusable.

Unit Testing Sitecore Components Part 2: Encapsulate Logic

In the previous post of this series I detailed 2 principals which can help with making Sitecore components more testable and reusable. These were "keeping the business logic out of the view" and "keeping the Item class out of the model". In this post I'll detail several more principals to continue improving the code.

WeBlog 4.0.1 Released

WeBlog 4.0 and 4.0.1 have been released. Version 4.0.1 is a bugfix release, so it's recommended to use that over the 4.0 release. You'll find the Sitecore packages for various Sitecore versions on the release page at

Keep items out of your model

The Sitecore Item class is very flexible. But this flexability is a double edged sword. All too often, it's tempting to simply pass items round your project API without creating a separate, explicit model. This can have performance implications when you need to scale and support 1000s of items.

The Reference Data Service

Sitecore 9.0 introduces the evolution of xDB, xConnect. xConnect is a complete (almost) rebuild of the customer behavior collection and reporting capabilities of Sitecore (plus more). These capabilities are now delivered through a new set of separate applications. In this post, I'll be introducing you to the Reference Data Service, which is a completely new capability that was introduced with xConnect.

The Great Hexo Migration

After much more effort than I anticipated, I've finally moved my Blog off WordPress and onto my own website, using Hexo.

Revolver 3.2 Released

Early this week I released Revolver 3.2. This release includes many small features I wanted to include in release 3.1, but I didn't want to delay that release just to fit them in. But there is one major new feature, Sitecore 9.0 support. For full details, find the Revolver 3.2 Release on github.