Software Developer from Glasgow, Scotland 🏴. Primarily working with Laravel, Statamic, Vue.js and Tailwind CSS. Part of the Statamic Core Team.
<p>We recently needed to set up Satis for private packages at work.</p> <p>For those not aware, <a rel="noopener noreferrer" target="_blank" href="https://github.com/composer/satis">Satis</a> is effectively a static site generator used to serve private Composer packages.</p> <p>We <em>could</em> have used <a rel="noopener noreferrer" target="_blank" href="https://packagist.com">Private…
<p>Michael LaRoy recently invited me onto the Talking Statamic podcast to chat all things Statamic 6, Cargo and Runway. I had a great time!</p> <p>You can listen on <a rel="noopener noreferrer" target="_blank" href="https://www.youtube.com/watch?v=6EzOqHjh3LY">YouTube</a> or in your <a rel="noopener noreferrer" target="_blank"…
<p><a href="/cargo-launch"><img class="full-width-image dark:hidden" src="/assets/cargo-alpha/cargo-social-image.png" alt="Cargo" /></a></p> <p><a href="/cargo-launch"><img class="full-width-image hidden dark:block" src="/assets/cargo-alpha/cargo-social-image-dark.png" alt="Cargo" /></a></p> <p>Cargo is a <strong>comprehensive e-commerce addon for Statamic</strong>. It’s built for small to…
<p>I haven’t written one of these in a while. I’m not much of a reflection person, but enough happened this year that it felt worth capturing.</p> <h2>Work</h2> <h3>Statamic</h3> <p>Work has been busy. We originally planned to ship Statamic 6 around April/May, but we decided to take on a full redesign, and things naturally snowballed.</p> <p>As part of that work, we migrated to Interia.js (🎉) and…
<p>The other day I gave my first talk at the Statamic Meetup in Alkmaar, Netherlands. I was talking about building e-commerce sites with Cargo, my <a rel="noopener noreferrer" target="_blank" href="https://builtwithcargo.dev">upcoming e-commerce addon</a> for Statamic.</p> <p><img src="/assets/alkmaar-talk.jpg" alt="Photo of me speaking at the Alkmaar meetup" /></p> <p>I had a great time. Thanks…
<p>This post lists all the tools, services, and equipment I use day-in, day-out. I ll update this post whenever I make any major changes to my setup.</p> <p>If you want to see other people s setups, check out <a rel="noopener noreferrer" target="_blank" href="https://github.com/wesbos/awesome-uses">github.com/wesbos/awesome-uses</a>, <a rel="noopener noreferrer" target="_blank"…
<p><a href="/cargo-alpha"><img class="full-width-image" src="/assets/cargo-alpha/cargo-social-image.png" alt="Cargo" /></a></p> <p>It s been a long time coming, but <strong>Cargo is finally in alpha</strong>! 🎉</p> <p>Cargo is basically a complete rewrite of <a rel="noopener noreferrer" target="_blank" href="https://simple-commerce.duncanmcclean.com">Simple Commerce</a>. It s been a massive…
<p>Meilisearch is a <a rel="noopener noreferrer" target="_blank" href="https://www.meilisearch.com/docs/learn/getting_started/what_is_meilisearch">super fast search engine</a> that s easy to self-host on your own infrastructure, avoiding the need for another Saas subscription.</p> <p>If you re using Laravel Forge, setting up Meilisearch is super simple:</p> <ol> <li>Provision a new Meilisearch…
<p>I recently shared how I m using <a rel="noopener noreferrer" target="_blank" href="https://reverb.laravel.com">Laravel Reverb</a> outside of a browser to build a real-time webhook proxy.</p> <div class="aspect-video"> <iframe class="w-full h-full" src="https://www.youtube.com/embed/OoxjLQ9r8W8?si=lr4vFLnWhkqsUiJK" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay;…
<p>Cargo (the new version Simple Commerce) is <em>basically</em> done. 🛍️</p> <p>I recently invited a handful of folks into the GitHub repo to help me test things before I make it publicly available.</p> <p>It s built on top of Statamic 6, so I m planning to make the repo public when Statamic 6 goes into alpha/beta.</p> <p>Then, I m planning to tag a proper <code>1.0.0</code> around the same time…
<p>After pairing with <a rel="noopener noreferrer" target="_blank" href="https://bsky.app/profile/benholmen.com">Ben Holmen</a> last week, I ve decided to open up my calendar and take part in the "<a rel="noopener noreferrer" target="_blank" href="https://benholmen.com/blog/pairing-magic/">Pair-amid Scheme</a>".</p> <p>I m very much an introvert, so pairing with strangers is a little outside my…
<p>It s nearly been five years since I started working on Simple Commerce. It started out as a way for me to play around with the Statamic 3 Alpha, but slowly and surely grew into the most popular way to build e-commerce sites with Statamic.</p> <p>From the beginning, I wanted Simple Commerce to feel "native" to Statamic. It should take advantage of using entries to store products, it should…
<blockquote> <p>Laravel Herd now has first-party support for profiling, without needing to change any Xdebug settings. See their documentation: <a rel="noopener noreferrer" target="_blank" href="https://herd.laravel.com/docs/1/advanced-usage/profiler">https://herd.laravel.com/docs/1/advanced-usage/profiler</a></p> </blockquote> <p>I <a rel="noopener noreferrer" target="_blank"…
<p>I ve recently found myself going to the GitHub website multiple times a day to gather context on the code I m looking at in my code editor.</p> <p>I looked at some VS Code extensions which allow you to view a "git blame" inside VS Code but I didn t really like any of the ones I tried.... so I thought it d be a fun evening project to build one.</p> <p><strong>Introducing "<a rel="noopener…
<p>An application I work on automatically generates & sends an spreadsheet export, with a few fields pre-filled. The user can then populate the rest of the data and upload it back into the application.</p> <p>However, one of the fields that s part of that spreadsheet is an enum field. This means that whatever value that s used for the field in the spreadsheet needs to match exactly with the…
<p>I ve just tagged the latest release of Simple Commerce, version 5. It includes a new concept of order & payment statuses, now supports Stripe Payment Elements out of the box, improves developer experience around building custom gateways & adds support for Statamic 4.</p> <p>It s come a long way since it was <a href="/simple-commerce-launch">released back in 2020</a>. Let s dive into…
<p>Torchlight is a really awesome API for syntax highlighting. In the past, folks might have used libraries like Prism or highlight.js. These libraries work but they re not completely accurate.</p> <p>Whereas, <a rel="noopener noreferrer" target="_blank" href="https://torchlight.dev/">Torchlight</a> uses the same syntax highlighting system under the hood as VS Code which means it can support any…
<p>Duplicator is by far my most popular Statamic addon, by downloads at least. And to be honest, it s probably one of my simplest.</p> <p>Duplicator registers a few actions: one for each of the things you can delete - an entry, an asset, a term and soon (hopefully) a form.</p> <p>Actions are what you see when you click the three dots on the listing tables:</p> <p><img…
<p>Last year, I unified the way I handled the docs sites for my addons.</p> <p>They re all handled by a single Laravel app which pulls in the content from each addon s GitHub repo.</p> <p>I thought it could be interesting to share how it works...</p> <ol> <li> <p><strong>Get the content from GitHub:</strong> If we don t already have the docs content, it ll go grab it using GitHub s zip download…
<p>Today I ve been playing around with using Laravel Dusk to test a payment form on a small website.</p> <p>The payment form is a key part of the owner s business so it s crucial it works all the time, whenever the customer makes a purchase.</p> <p>The site uses Stripe Elements to let the customer enter their payment information securely.</p> <p>Elements creates its own iframe element which makes…
<p>If you re slicing a design from a designer in Sketch, you may find some horizontal/vertical red bars. Here s a quick little how-to on how to get rid of them.</p> <ol> <li>Go to the Sketch artboard with the red bars</li> <li>Go to <code>View</code> in the top Sketch menu, in the dropdown, hover over <code>Canvas</code> and then <code>Layout Settings</code>.</li> <li>You ll see something like…
<p>I m going to presume you already have Valet and Homebrew setup. To install Imagick, there s a couple of commands you ll need to run:</p> <ul> <li><code>brew install imagemagick</code></li> <li><code>brew install pkg-config</code> (also if it s already done)</li> <li><code>pecl install imagick</code></li> <li><code>valet restart</code></li> </ul> <p>In case you get a Connection Timeout when…
<p>I did something a bit stupid yesterday... I was playing around with Firewall rules on my Forge server. I setup a rule so that the only place I can SSH into my server was from my home IP Address.</p> <p>However, as soon as I did that, I realised that I could not longer deploy code or do anything via Forge on that server. Then I realised my mistake.... I blocked Forge s IP Address from SSH ing to…
<p>A few weeks ago today I finally launched the first version of <a rel="noopener noreferrer" target="_blank" href="https://github.com/duncanmcclean/simple-commerce">Simple Commerce</a>.</p> <p>If you ve not been following me for very long, Simple Commerce is the e-commerce addon I ve been building for Statamic.</p> <p>If I remember correctly, I started prototyping what Simple Commerce could look…
<p>Recently, I had to build out a help site for a client. One of the features in site was for the user to be able to like help article or forum posts. I managed to build it out reasonably quickly, I think it took me a day to get everything working.</p> <p>I was thinking that this sort of addon would be a good candidate for building in a blog post. So that s exactly what I ve done. It goes through…
<p>I m in the process of moving all of my AWS stuff into it s own account, separated from my online shopping account. It s a process that has to be done manually as AWS don t have an easy way of moving resources between accounts.</p> <p>Anyway, to stop you trolling through Amazon s horrible documentation to get this ugly job done. Here s some simple instructions on moving files between buckets and…
<p>The Statamic 3 beta has been out since the middle of November if I can remember correctly. V3 basically turns it into a package for Laravel rather than a pre-built Laravel app. This is the change which allows for Statamic add ons to finally become Laravel packages.</p> <p>I’m gonna quickly give you a walk through of how you get started building an addon, including setting up the…
<p>So I recently created a service worker for one of my apps so I could turn it into a Progressive Web App.</p> <p>Although, for some reason I was under the impression that I should cache the main page of my app. I later realised that it was a very bad idea.</p> <p>I think I m the only user of the site that came across this issue before I patched it but I found it quite a pain to unregister the…