Getting your Craft CMS website ready for production

Thomas Schoffelen
4 min readSep 12, 2019

--

I’ve never really liked working with CMSes (and I’ve tried quite a few!), since it often feels like you’re spending more time working around limitations of the CMS and cutting corners to make content editable for your customers, instead of focussing on building quality web experiences.

Since I stumbled across Craft CMS a few years back, however, I haven’t really looked back. The blank-slate approach of Craft — no default templates, no boilerplate code — makes it easier than ever to build an experience exactly in the way you had it in mind. By now, our agency Infowijs has built more than a dozen Craft sites, and every time we build a site we learn something new that we love about Craft.

Here’s our most important steps in getting those beautiful websites ready for launch:

Image transforms everywhere

After our initial build of a site has been approved by the customer, one of the first things we do is search for all instances of .url in our Twig templates, and create appropriate image transforms that scale images to be the perfect size and quality for every part of the page.

That’s as easy as:

  1. Creating a new transform, choose a crop mode, enter width and height, and choose an image quality and format.
  2. In your template code, simply replace your {{ asset.url }} with
    {{ asset.getUrl('transformName') }}. Easy as that!
The UI for creating a new image transform in Craft CMS.

Adding SEO fields

The next thing we do is install the great SEO plugin by Ether Creative. It’s like Yoast for Wordpress, but built to fit within the simplistic style of the Craft admin panel. For each entry type that has its own pages (blog posts, about pages) we add the SEO field as a separate tab, so the customer always knows where to go to add a custom Facebook or Twitter image or edit the meta description of the post.

--

--

Thomas Schoffelen

Entrepreneur tech kid, co-founder of NearSt, Londoner, open source enthusiast and aspiring spare time literature geek.