Gareth Redfern developer, cyclist & coffee lover

A Redesign & Move To Statamic

Posted by Gareth Redfern
Category: statamic Tags: statamic-v1

For anyone who hasn’t heard of Statamic it’s a fantastic CMS that has been available since May 2012, using a mixture of YAML Front Matter, template syntax and built on PHP to enable a really flexible system.

Let’s start with the name. “Statamic” is the love child of the words “static” and “dynamic”, which is a perfect description of what it does and how it works. Static files are used to generate fully dynamic websites.

For anyone coming from developing sites in ExpressionEngine you should feel really at home with the template syntax which you would expect when one of the developers is Jack McDade, The EE developer who created Structure, an extremely popular plugin used by many developers. I quickly got into the the template syntax and the docs are pretty straight forward to follow. For anyone starting out I would recommend following the tutorial video on building a simple blog, to get you going.

Why Statamic?

As a lot of web designers and developers will probably agree, writing content on a regularly basis is hard, and whilst I have made a conscious effort to write more this year, I have not written nearly as much as I would like to. One thing that I have found has helped with my writing is using Markdown in an editor such as IA Writer or Byword they keep me distraction free and I find that I actually enjoy creating content using them (but that is probably another post altogether). So how does that tie in with Statamic? Well Statamic allows you to work with content in a couple of different ways. You can login to the admin area and use the simple and responsive user interface, similar to how you would add content in many other CMS’s, or you can create markdown files which can be written in an editor of your choice. Where things get even better are that the complete site including all the content can now be version controlled using Git, making for a complete, flexible solution which I have to say I have fallen in love with. No more Databases and struggling to keep development and production servers in sync the whole thing is stored in github and when I want to publish new content or even a completely new look for the site I just push from development to production as simple as that.

Moving My Content

Mainly due to the fact that I am already writing my posts in Markdown and storing them in Github meant that once I got my head round creating the template structure for Statamic I could easily move all my existing posts from my existing EE site. I have created an Amazon S3 account which stores all my images, this again makes life really easy when moving a site from server to server, but of course you can easily store your images within Statamic’s file system if you choose to. Another small change to to how I work is I am now embedding Gists for my code examples using Github’s embed code. This made sense as I store all my code snippets as Gists on Github anyway and hopefully readers will find this more useful to quickly share code. Codepen has a similar service which I will definitely be looking to use more in future posts.

Template Structure

The tempting system is fantastic, the basics being that you create layout templates for the site structure and add content using a mixture of templates and partials, which ties in to how I have been working with ExpressonEngine using Stash for some time. What I am really looking forward to is the ability to easily build, share and sell templates for Statamic, something that has never really taken off with ExpressionEngine.

Getting Started & An Exciting Future

The guys at Statamic are pushing updates on a regular basis and they are really helpful if you need to ask any questions either through twitter or in the support area, with each update seems to come new and improved features and very soon there will be a market place where developers can sell plugins and templates. I am putting together a starter theme which is available at Statamic Themes this will hopefully help anyone to get started quickly, there are no styles just a blank canvas to get going.

Further Reading