Skip to main content
Jack Sleight .DEV

Refactoring Statamic content with Distill

Sometimes it's necessary to refactor your blueprints—for example, if you decide that a field should be renamed or a set should have a different structure. While it's easy to edit the field configurations, updating existing content to match can be a chore, especially if you have… More

Adding actions to specific Statamic fields

The recently released field actions feature in Statamic allows you to add custom actions to built-in fieldtypes. By default actions apply to every instance of a particular fieldtype, and you can control the visibility with the visible function. So what if you only want to enable… More

Adding footnotes to bard with Texstyle Pins

My Bard Texstyle addon for Statamic was recently updated with a new feature called Pins. These make it really easy to add custom elements within a line of text, like icons, footnotes, and dynamic values. This post is a quick overview of how to add a footnote pin type and… More

Importing HTML into Statamic’s Bard fieldtype

Statamic’s Bard fieldtype stores values as ProseMirror documents, so if you’re importing existing HTML with a PHP script it makes sense to convert it to the nodes and marks Bard expects. This guide outlines how to convert HTML to ProseMirror, a couple of gotchas, and finally how… More

Introducing Bard Texstyle Pro edition

I’m excited to announce the release of Bard Texstyle 2.1 and the brand new Pro edition. Although 2.0 only just came out that was mainly a compatibility release for Statamic 3.4. This is a big release with some major new features, both for the new Pro edition and existing Free… More

Reading Markdown front matter in Statamic

Statamic's markdown modifier allows you to parse markdown into HTML. But what if you have markdown from an external source that contains front matter values? The default markdown parser and modifier dont parse or return front matter values, but it's easy to add that ability! The… More

Blueprint based page aliases in Statamic templates

The page variable in Statamic templates contains the current entry, and is the primary way to access entry values in Blade. This works great, but when you’re working on non-page collections you might prefer to use a variable name that reflects the current blueprint, perhaps… More

Computed values in Statamic entries

Statamic now officially support computed values so you don't need this. Statamic allows you to alter entry values through the use of modifiers in your templates. However, if you’re applying the same modifications in multiple places or need a modified value outside of a template… More

Alpine x-node directive

Alpine's x-text and x-html directives allow you to set an element's text or HTML content, but what if you have a DOM node, either from the current page or one that you've created, and want to add that to an element with Alpine? You could use innerHTML and x-html, but that may… More