Fathom Analytics Fathom Analytics

Fathom loves Statamic

Paul Jarvis, co-founder Fathom Analytics

Written by Paul Jarvis

Published on: July 31st, 2019

There is no shortage of modern, flat-file CMSs out there. Every day it seems like another one has launched. So when we set out to redo the marketing site (this site) for Fathom, it was a bit of a hunt to determine which was best.

Initially I was a little worried to veer away from WordPress. I’ve used it for 15+ years and built literally 100s of custom themes with it. So I know it inside and out. That said, in recent years it’s felt dated, sluggish and bloated for things like a simple site with a blog.

I tried several flat-flat CMSs before settling on Statamic. Why Statamic, you ask? Well, our software is built on Laravel, so a frontend that’s also Laravel makes a lot of sense. We can pass data between our app and our front-end as needed (we haven’t yet, but we could).

Yes, it’s fast. Yes, there’s version control. Yes, there’s an easy control panel (you can avoid it like I did if you’re happier editing YAML files instead).

But mainly I like Statamic because it costs money. Yes, you read that right. I know how hard it is to run an open-source project first-hand, but I also know how many open-source projects disappear after a while because it’s too much work and cuts into time you could be spending getting paid to code. So using software that costs money means we are supporting a company’s bottom line, and profitable companies don’t tend to go out of business.

Like Fathom, Statamic is a tiny, yet focused team in it for the long haul. They’ve been around since 2012 and have a pretty vibrant developer community too.

Custom or nothing

Being a designer who is good enough to be dangerous with creating custom themes for CMSs, I wasn’t ever going to be happy using a free or paid theme available from the Statamic marketplace. They’re perfect for some, but not me.

The first thing I did was nuke every bit of content and stock theme from Statamic. Luckily there’s a handy command-line tool to give you a fresh start:

php please clear:site

I wrote this Fathom site in HTML/CSS first, then began living in Statamic’s documentation. Which wasn’t even as bad as it sounds—it’s well written and easy to understand.

All in, I spent about 6-7 days learning how Statamic works: content, globals, assets, themes, variables, modifiers, etc. Then I spent another two days building the custom theme from scratch. Which feels like a huge win: I knew nothing about Statamic one day, and nine days later this site exists as a custom Statamic theme with content.

I especially found the ability to create custom fields in the header bits of content helpful for things like adding meta descriptions to each page and blog post, with fallback content (should I forget):

---
title: Here's the page title
meta_desc: This is the meta description for search engines, which I also used for excerpts on blog posts and support articles
---
Here's the content.

It was also very easy to create both a blog and a support articles repository on the site. Both are simply “collections” and I defined them with a file called folder.yaml in the content/collections folder, like so (this is the news collection):

template: news-post
order: date
title: News

Then I created a route for them to load via the routes.yaml file:

collections:
  news: '/news/{slug}'
  support: '/support/{slug}'

Finally, on both the /news/ content and /support/ content, I told Statamic to mount those collections to those pages, like so:

title: News from Fathom
meta_desc: A monthly email that helps bloggers and business think critically about the changing business landscape, as well as occasional Fathom product news.
mount: news
template: news

Sure, I could have done that via Statamics admin panel, but I like that I have the ability to do it all through some simple code.

Making an XML sitemap and RSS feed was also ridiculously easy, following the instructions in those links.

Since a few pages look different (like pricing and features) I created a template for each in templates in my theme, and then referenced that they should use each template in their content file. For example, the features content:

---
title: Analytics for your website without training
meta_desc: Learn what you need to know about your website’s metrics from a single, easy to read screen.
template: features
---
Content!

I even created some global variables, in the global.yaml file in the content/globals folder so I could have things available on multiple pages, like a tagline (my fallback for the meta description) and an email address using my variable email_address, which could then be obfuscated using:

{ email_address | obfuscate_email }

Concluding

I was nervous to give Statamic a go at first, then really excited once I started making headway with it. I even mentioned to Statamic’s founder, Jack McDade, how stoked I was about using his software. He replied that he’d be happy to screen-share with me to go over any items I wasn’t clear or sure on, which was AWESOME. After about 30 minutes into our call, I had learned even more about fieldsets and Bard (features I had missed when building my first site).

Overall, Statamic feels like a CMS of the future, whereas WordPress feels like a CMS of 10 years ago. It should also be said that Statamic is more secure and private (since core WordPress plugins like Jetpack back up your content on their servers).

Overall, I’m sold on Statamic and can’t wait to use it again for my other sites.

Filed under: newsReturn to news →