Writing an addon for Statamic (aka learning to love the AddonServiceProvider)
Building Statamic addons becomes easier once their service provider makes sense, so I share the setup decisions, workflow and registration helpers I’ve found useful in my own packages.
25 May 2022
22 min read
Adding watermarks to images in Statamic 3
Rebuilding my photography website gave me a reason to automate image watermarks, keeping their sizing and placement consistent without preparing every upload by hand.
4 Nov 2021
16 min read
Using Alpine.js in a Netlify form
A form that worked locally disappeared from Netlify’s detection after deployment, and tracking down the cause revealed an awkward interaction with Alpine’s submit attributes.
28 Oct 2021
5 min read
Conditionally including partials in Statamic 3 using the new 'exists' and 'if_exists' tags
A missing optional partial shouldn’t bring down an entire page, so I contributed helpers that let Antlers templates check for files or quietly continue when an include isn’t available.
5 Oct 2021
6 min read
Statamic 3's 'please' spec for Fig
Seeing how Fig builds its command suggestions inspired me to contribute a Statamic spec, bringing autocomplete for commands, arguments and options to the terminal’s ever-so-polite please command.
1 Oct 2021
3 min read
Singular and plural modifiers in Statamic 3
Getting result labels to read naturally is a small detail, but Statamic’s singular and plural modifiers offer a useful starting point for those finishing touches.
19 Sep 2021
3 min read
Filtering entries by Taxonomy in Statamic 3 using AND or OR logic
A client needed several taxonomy filters with different matching rules, so I built a Statamic tag that combines AND and OR conditions while keeping control over its underlying query.
4 Sep 2021
7 min read
Using Dynamic Token in Statamic 3 and full static caching
Before Statamic handled dynamic tokens itself, pairing an addon with full static caching offered a way to keep forms working while retaining the speed of cached pages across the site.
1 Jul 2021
3 min read
Using multiple domains with a multi-site in Statamic 3
Replacing separate static landing pages with editable content led me into Statamic’s multi-site features, with different domains sharing one application and some useful discoveries.
29 Jun 2021
10 min read
Pull request: add “form” to Submission array
Identifying which form produced an email should be simple, so a small Statamic contribution helped make shared submission templates more useful across multiple forms.
18 Jun 2021
3 min read