Blog

Using localStorage in Remix

I wanted to get some more experience working with GraphQL mutations, so I worked on a new feature for my site that enabled a user to “like” a blog article. I ran into a little gotcha that is kind of obvious now that I know the solution but wasn’t obvious at the time. I didn’t think I needed to be fancy and store the “like” in the database and associate with the user, so I decided that tracking…

Setting Up Live Preview with Craft CMS in Headless Mode

In my previous post, I talked about transitioning my site from being powered by Craft to being powered by Remix and a GraphQL endpoint coming from Craft. One of the best features of Craft is Live Preview, and it took a little configuration to get this working on my new Remix powered site. Remix Configuration These were specific changes that I needed to make on the Remix side, but really it would…

Why I’m So Excited About Remix

I’ve been building on the web for a long time. There’s a part of me that still has a bit of an old school mentality, and it’s hard for me to get really excited about new technology. Sure React was cool when it came out for its state management, but I didn’t see it as the be-all and end-all for building on the web. I really like Craft CMS for building CMS powered sites since I have full control ove…

What I Love & Hate About Tailwind CSS

As a long time skeptic of Tailwind CSS, I’ve finally given it a try and discovered some things I love and hate.

How We Prevent Leaky Templates in Craft CMS

Prevent the flood of leaky templates in Craft CMS with just a little bit of PHP.

Level Up with Craft CMS: Know When to Ditch Twig

If you notice your Twig templates are getting overly complex, it may be time to extend Craft with a custom Module.

Why You Should Update to Craft 3 ASAP

Updating to Craft 3 means new features for your site with improved performance and security. This latest version was released earlier this year, and you should update as soon as possible!

Managing CSS & JS in an HTTP/2 World

We have been hearing about HTTP/2 for years now. We've even blogged a little bit about it. But we hadn't really done much with it. Until now. On a few recent projects, I made it a goal to use HTTP/2 and figure out how to best utilize multiplexing. This post isn't necessarily going to cover why you should use HTTP/2, but it's going to discuss how I've been managing CSS & JS to account for this paradigm shift.

Craft Color Swatches Plugin

The control that Craft can provide a user is what makes it stand out as a content management system. But sometimes we want to limit what a user can choose from. Craft has a built-in Color field which allows a user to select any color from a color picker. There are times when we only want a user to choose from a select number of colors though. Previously we have done this by using a dropdown with a list of colors, but I decided to build a plugin to allow a user to select from an admin-defined set of colors.

Responsive Images with srcset & Craft

Tommy recently wrote about responsive background images in Craft, but I wanted to follow up about how we used the <img> element and srcset to build responsive images on this very site (powered by Craft).

Pagination