Category: Vercel

Moving Sitemap.xml Generation to the Head

A standard part of every website is the Sitemap XML. Traditionally, the CM instance (XM Cloud included) generates this XML file (or files) and stores it in the media library and publishes to Edge it with each publish. Your headless application pulls this from Edge and streams it out to the browser. That’s pretty simple…


Vercel’s “An unexpected error happened when running this build.”

Imagine a world where everything works all the time, and there are no weird-ass errors to troubleshoot. Sounds boring, yeah? Good thing it’s not a real place. Fantasies aside, sometimes things that have been working for ages just stop working. We ran into that case just recently with a project. This project has been live…


SPE-based On-demand ISR in NextJS

If you’ve made the jump to Headless with NextJS, Vercel, and Edge, you’re likely using Static Site Generation (SSG) at build time, and you’re likely going to be using Incremental Static Regeneration (ISR). SSG is useful to build some or all of the pages before your deployment is complete, thus giving users immediate access to…


Solved: Connection to your rendering host failed with a Payload Too Large

Imagine you’re walking your dog/cat/sheep/child whatever and you come across a hole in the ground. It looks like some furry critter dug a hole. Nothing weird. Now you head over to examine a hole, and out pops a dolphin. You may say WTH. That’s kinda the same response I had yesterday when I solved this…


Adding CMS-controlled JavaScript to your NextJS Site

Every site out there is going to require some level of JavaScript to be added to the pages. From Analytics to Personalization, to Media, to even some basic animations…it’s going to be there. For things like Google Tag Manager, there’s already some strong opinions on how to implement. Here’s a few: https://nextjs.org/docs/messages/next-script-for-ga https://morganfeeney.com/guides/how-to-integrate-google-tag-manager-with-nextjs https://dev.to/valse/how-to-setup-google-tag-manager-in-a-next-13-app-router-website-248p For…


SXA Branch Pages Failing to Build

One of our projects these days is all the rage (well mostly). A Headless SXA build using Experience Edge and Vercel NextJS. Learning curves aside, the project has been pretty fun. Lots of new things to figure out, problems so solve, workarounds to do… it’s a treat (not sarcastically) One thing we ran into while…


Connection to your rendering host failed with an Unauthorized error. Ensure the JSS Editing Secret is configured.

Edit: Soooo there is actually a great article on this, here: https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#environment-variable-load-order The long and short of my issue is that I was using ‘SITECORE_JSS_EDITING_SECRET’ when I should have been using ‘JSS_EDITING_SECRET’ I must have grabbed the environment variable from the docker-compose file, which will of course not match! Thanks to Rich Seal for having…