Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/

A blog about technology that catches my attention

It's a bit like a swap-file for my brain...

10 years, 337 posts and counting

What's the 'minimal change' to use Entra External ID for public login with Sitecore?

How much work would be required to allow its use?

I did a little proof-of-concept hacking recently around the idea of "what's the least work required to allow your existing Sitecore website public login to move to Entra". I ended up with the bones of an interesting approach, which might be of interest to others. So read on for ideas:

Docker might not like your Sitecore secrets

Why do I suddenly have odd looking warnings?

I quite often clone Sitecore's Docker Examples repo and spin up a Sitecore instance to experiment with. It's a quick way to create a disposable site which I can easily configure and deploy little bits of test code to. But recently I did this and noticed some odd warnings. So here's what happened and why, to help you avoid the same issue...

What looks good on the Symposium agenda?

Where are you likely to find me?

Having sorted out my travel plans for this October's Symposium and MVP Summit in Nashville, I've been having a think about what sessions I'd like to go and see. Here's a summary of my thoughts so far...

Sitecore Symposium ~5 min. read

Fun gotchas with Sitecore GraphQL and .http files

Learn from my pain if you're using this tool to test queries

I was having a chat recently about alternatives to Postman if you needed to send HTTP requests to arbitrary web endpoints. I mentioned using Visual Studio's support for .http files for this during that discussion, and then found myself trying it out for some work too. But it seems there's a couple of tricky little bugs hiding in here, which tripped me up when I tried to set up a call to one of Sitecore's XM Cloud GraphQL endpoints.

Scripting your data with SSMS

I've had to look this up once too often...

As developers we often need to move data between SQL Server instances. Some of the time database backups are fine for this, because you want to move everything. But on occasion what you need is a SQL script which can insert some rows of data you had on another server for you. And when I find myself needing this feature, I also find myself having to google how to do it. So to help my memory, here's how to generate scripts for your data:

SQL Server ~1 min. read

A key trick that makes search fast

It's interesting to think about internals sometimes

Recently I added a basic search page to my blog. This is a pure static site, hosted on Github Pages, so there's no Solr or Algolia here. Just some clever JavaScript (Lunr.js) acting on data generated by Statiq. Setting that up made me think about the internals of how a search can work efficiently, and I figured others might be interested in this...

General ~5 min. read

What happens if you duplicate field names?

We're told not to get into this state, but why?

Data Template inheritance. Most of the time it's great and a powerful tool to help you define your content schema effectively. But there are a few places where it can trip you up - and one of the interesting ones is duplicated field names. I found myself chatting about what actually happens and how this might affect PowerShell scripts and headless code recently, and it seemed worth writing down...

Automating Git

Because sometimes it's helpful to have code to push for you...

I've written a few times before about trying to smooth out the rougher edges of the process of blogging with some custom tooling. Both the site generator I'm using these days, and the simple editor tool I hacked together to suit my writing process. I realised recently that one of those rough edges that remained in the process was the need to manually commit my writing to source control, so I wondered what it might take to wire that into my editing tool...

C# Git ~5 min. read

Avoiding Display Name confusion

A trick to rememeber in Content Editor

I had a moment of frustration recently, when I spent a while looking for a Data Template in a particular Sitecore site and couldn't find it because a previous developer had set a Display Name. As a result of moaning about this Corey Smith reminded me of a way I could have helped myself here, and it seemed like something to share...

Sitecore ~2 min. read

Generating C# code with Roslyn APIs

Do you have to litter your generator code with literal strings of C#?

A while back I wrote about the transition from T4 templates to using Roslyn Source Generators for generating code in .Net Core solutions. While that worked for me, and I was able to get it to do what I needed, I was never really happy with all the output source as literal strings in the generator code. Recently I had another potential use for generated code, so I decided to try and fix this issue...

C# .Net ~8 min. read