Tailwind and Web Craftsmanship

Rob articulates my feelings in this whole stupid “Tailwind vs Vanilla CSS” argument. Thanks Rob! Gatekeeping and framing in web development There’s a lot of articles and website out there dedicated to bash on Tailwind and their users. I have over a decade of experience in writing …

Buttons with CSS

Going back from all-utilities to plain CSS for styling buttons has made my life easier. Please note: I have zero interest in taking part in that dreaded love/hate Tailwind argument that cooks up every other month on social media. These are just some reflections about how I’ve been doings thing …

Cannot Divide by Zero in Peak Picture Partial

When assets don't contain valid images that can be processed by Glide (which can happen by migration or by not setting up proper sanitation rules for asset field uploads), a white screen of death due to a division will occur. This happened to me in various scenarios A migration of legacy data …

Using the AVIF format for CSS background images

Today I learned that browser support for the AVIF image format has become excellent, with every major browser except Edge supporting it. As I'm implementing a design with a big background image, this is great. At half the size of the JPEG, it offers way better quality. (WebP wasn't noticeably better …

Workaround for Email Validation Issue in Statamic

Through a failed Horizon job I found out about the following: A user had entered an email address with an accidental space before the @ symbol. This caused the email to not be able to be sent and the Horizon job to fail. Apparently, according to some email spec, spaces are allowed in the front part …

Install a Starter Kit from local repo to get the latest Peak working in Statamic 4 beta

I needed to do this to install the latest Statamic Peak into the Statamic v4 beta. Clone the Starter Kit (read: Statamic Peak) Repo locallyI also had to update Peak's dependencies in starter-kit.yaml to betadependencies: studio1902/statamic-peak-browser-appearance: '2.0-beta.2' …

Set sensible validations for Statamic image uploads

By default, Statamic asset fields don’t validate size or file type. Recently I’ve had a bit of trouble with large image files clogging up the Git repo and image color being off due to the client uploading hug Tiff files. To prevent this from now on I decided to limit image uploads to the jpeg and …

Render first heading inside Statamic Page Builder as `h1`

Say you have a headline field on various Page Builder elements, and one as a set of in a Bard field. Both should visually look the same. Semantically, the first occurrence of any of these headlines on a given page should render as h1, every following as h2, without an editor having to set anything …

Remove Large Files from Git History

I recently had the case of a client uploading huge tiff files (some larger than 100 MB) into Statamic image fields. Obviously, I should make this impossible in the first place. Yet, here I was with these big files having been uploaded and auto-comitted by Statamic’s Git integration. While comitting …

First List Item inside CSS Multi Column Layout is offset

An annoying thing when using CSS Columns pops up every now and again: When having list items (<li>) inside the columns, the items in the first column are often times a bit off. This happens across browsers in Chromium, Firefox and Safari (current stable version from Thu 15. Dec). Setting the …

Presenting the Peak Starter Kit at the Statamic Meetup Berlin

Here's a (re-)recording of the talk I gave yesterday (Dec 1, 2022) at the Statamic Meetup Berlin. It's about why the Peak Starter Kit is a brilliant basis to build websites. Although it assumes some knowledge about Statamic CMS, it might also be interesting to people who are curious about a better …

Want to read: 20 Bits I Learned About Building Websites by Dan Cederholm 📚

Statamic CMS talk at Frontend Meetup Freiburg 2022

This week, I had the chance to tell some nice people why I enjoy working with Statamic CMS. As promised, here come the slides, a couple of links along with the raw screen recordings I did while creating the demo project used in the presentation. Slides & Screen RecordingResponsive, interactive …

Install & Configure Laravel Horizon with Statamic and Run it on Forge

Follow these steps to use Laravel Horizon for Job Queuing in Statamic CMS when hosted with Laravel Forge. This guide assumes that Redis is already installed via Forge. Add Horizon to the project composer require laravel/horizon and publish its assets php artisan horizon:installAllow one or more …

What Statamic’s SAVE_CACHED_IMAGES really does

I think I got SAVE_CACHED_IMAGES in Statamic wrong the whole time. I thought it's about whether Glide-generated images are kept when clearing caches. Assuming I got it right, this is what it really does: when set to true All image presets defined in assets.php will be generated on uploadAll Glide …