Last Updated: February 25, 2016
·
3.321K
· michiels

Ruby for WordPress development

Normally, we are a Rails shop and very happy with all the tools and community best practices that come out of the box with using Ruby and Rails.

Lately, we've been doing some WordPress development things (just for fun! :/) and the development process just sucked. Even when you put everything in Git deployment and collaboration is still a hassle.

Here are some things that made our work easier:

Use Compass

We've added Compass to our WordPress theme development by using our command line and the compass gem. We wrote a style.css for the WordPress theme info and added our own default stylesheets/ folder where compass would compile our stylesheets to.

Put each theme in a Git

We are working on multiple themes and would like to be able to make changes. We've put the root of each theme in its own separate Git repository. Then on our local development machines we installed WordPress and symlinked our theme repositories into the wp-content/themes of our own WordPress installation.

We can each make our changes independently with Git and also test it in a running WordPress installation.

Use Rake for common tasks

We wrote a few Rake tasks that would help us package and deploy our theme for distribution. Basically, the Rake task compiles the stylesheets, removes development files and adds it all up into a nice .zip file for WordPress distribution.

1 Response
Add your response

We're in the process of migrating from WordPress to Middleman. We get all the advantages of Compass, Sprockets, Rake, and so-on with the simplicity of static content.

We store content in flat markdown files, and I wrote a simple editor that lets non-technical people edit them. It's pretty neat, and it's been great to work with.

The best part is that we're doing this as an experiment, so we're swapping out pages one at a time: https://coderwall.com/p/xrbeug

over 1 year ago ·