Hi There
I'm Zach. I'm a Dad, Developer, and Musician. All nerds need a code-playground, and this is mine.
Devs complain about wordpress, myself included. As I started with Statamic, all of the things I hate about working in wordpress came out front and center.
Statamic seems to be built ground-up as a content management tool without an opinionated stucture. In wordpress, everything is a post, categories are baked in, tags are baked in, users are a must, themes can alter everything and... the list goes on. In statamic, the content editing piece is scaffolded out for you, but there's no default structure (aside from pages, which you can remove if you want?). This means you aren't working with some global var called $post
when you're working on a page, product, biography, etc. It's nice to have actual context clues in your variable names, and not to have to explain to someone that "yes, its still a 'post' even if its a page."
My biggest gripe with wordpress has always been source control - While you can source control a theme without issue, source control for pages is just... not an option. Sure, there's revision history in wordpress, but not if you use some shitty host that removes that feature because it results in excessive DB storage (looking at you, wpengine).
With statamic, I can selectively include or exclude folders from source control, and since the content is stored as markdown files they are just flat files rather than DB entries. I don't know that this will scale well, but for a small site it's awesome.
Wordpress theming sucks. Even the new block editor is a huge pain in the ass to build things for. I don't mind excessive tooling for a project when the output is worth it, but just to create a new block type in guttenberg is a hot mess. With statamic, I can throw new fields in on the fly, modify all the validation, and instantly access them in my templates. For example, when creating a new post
collection, my home page template now looks like this in order to render them out:
{{ collection:posts paginate="4" as="posts" }}
{{ posts }}
{{partial:post-preview}}
{{ /posts }}
{{ /collection:posts }}
And inside my post-preview partial, I have access to any fields I've created on my posts, such as {{ featured_image }}
, {{ title }}
, or even passing params to modify fields like the post date: {{ date format="M jS, Y" }}
.
Even displaying tags for the post is as easy as:
<p class="text-white/50 px-4 pt-2 pb-2">
{{ tags }}
#<a href="{{ url }}">{{ title }}</a>
{{ /tags }}
</p>
So my next steps are going to be setting up a new collection type for 'projects' where I can show things I've worked on, and one for 'music' where I can post either audio or video of music I'm working on. So far, I'm really excited about the flexibility and stability that I think statamic could bring to some of our clients.
Built with <Code/> & Caffeine | © 2024