Next.js API Route for On-Demand Cache Revalidation using pages or app folder

If you're looking for an API endpoint implementation that can take a dynamic path from a query string to revalidate page cache and force page regeneration, you've come to the right place. The biggest challenge with using statically generated sites is the difficulty of pushing content updates quickly in urgent situations. You can't set the … Continue reading Next.js API Route for On-Demand Cache Revalidation using pages or app folder

Sitecore PowerShell Export Items to List, CSV, Excel, HTML, Json and XML

Sitecore is one of the best content management systems. One powerful feature is Sitecore PowerShell Extensions (SPE), which lets you automate tasks and manage the platform easily. Exporting data from Sitecore using PowerShell is simple and very useful for administrators and developers. Here’s a quick guide to show how easy it is to export item … Continue reading Sitecore PowerShell Export Items to List, CSV, Excel, HTML, Json and XML

Find Duplicate Items Fast Through Sitecore PowerShell

In my previous posts, I discussed common issues encountered when deploying with Sitecore CLI, specifically focusing on avoiding and resolving duplicate items. I proposed two solutions: Identifying Duplicates with Sitecore PowerShell: This method, while effective, is slow and resource-intensive. Running a Database Query to Find Duplicates: This approach is very fast but requires direct access … Continue reading Find Duplicate Items Fast Through Sitecore PowerShell

Sitecore Error discovering identity provider

I was getting this weird error on my local Sitecore Docker setup setting up from scratch. The funny thing was the Sitecore and login page was working fine in the browser but not from PowerShell/Command Prompt as I was getting this error D:\Projects\STB\Source>dotnet sitecore login --authority https://id.stbcom.localhost --cm https://cm.stbcom.localhost --allow-write true Error discovering identity provider. … Continue reading Sitecore Error discovering identity provider

Fix Duplicate Item Names in Sitecore

If you are using Sitecore Content Serialization (Sitecore CLI) as the serialization pull and or push command will fail without any meaningful error. Therefore, we must ensure that there are no duplicate item names under same parent ever. Unexpected HttpResponseMessage with code: BadGateway 1421 error occurred: 143 * Status: The command 'powershell -Command $ErrorActionPreference = … Continue reading Fix Duplicate Item Names in Sitecore

Avoid Duplicate Item Names in Sitecore

In Sitecore, avoiding duplicate item names is crucial to maintain a well-organized content structure and to prevent conflicts within the content management system. This becomes even more important if you are using Sitecore Content Serialization (Sitecore CLI) as the serialization pull and or push command will fail without any meaningful error. Therefore, we must ensure … Continue reading Avoid Duplicate Item Names in Sitecore

Next.js Static Site Generation (SSG) vs Server-Side Rendering (SSR)

When it comes to building server-rendered React applications, Next.js has become a popular choice among developers. One of the key decisions developers have to make is choosing between Static Site Generation (SSG) and Server-Side Rendering (SSR). Both have their own benefits and tradeoffs, and choosing one over the other depends on the requirements of the … Continue reading Next.js Static Site Generation (SSG) vs Server-Side Rendering (SSR)

Sitecore Headless Multiple Layouts using Next.js

This post is inspired by https://www.techguilds.com/blog/how-to-use-dynamic-layouts-in-headless-sitecore-applications Problem Statement It is very common to use more than one layout in Sitecore and there could be many reasons. Back in the old MVC days, you would simply link the layout to separate MVC or ASPX files. With Sitecore headless and Next.js you need some code customization as … Continue reading Sitecore Headless Multiple Layouts using Next.js