Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



36 Commits

Repository files navigation

WordCamp Bristol 2017 talk project files

Get Twig. Use Twig. Smile.

Talk slides

Three example themes for you to play with:-

  • Twig - Uses Twig via the Timber plugin. Includes an integrated styleguide via Spress.
  • Child - Child of Twig theme, demonstrates how you can override twig templates in child themes.
  • Normal - Same design as the Twig theme but no Twig.

Getting up and running


The styleguide is integrated into the twig-theme. It is a static site generated by Spress.

You can view the styleguide in two ways:-

  1. Setup a dev domain to point at the /twig-theme/styleguide/build folder

  2. Install Spress and run Spress local server

    • Follow the getting started page on the Spress.
    • Using the command line cd into that directory and run ./, this will start Spress's built in server and serve the site from http://localhost:4000

Notes on symlinks

The partials directory in twig-theme/styleguide/src/includes contains all the twig templates shared by twig-theme and the styleguide. Unfortunately I could not get symlinked folders to work inside the styleguide so I've had to place the files within the styleguide and symlink them out to the main folder of twig-them.

It would be better if there was a way in Spress to specify other directories outside of the Spress folder to look in when generating the static site.

I think this might not be too hard to do so I plan on giving it a go an submitting it patch to Spress if I manage it.

Twig cartoon character wearing a cape


Example WordPress theme using twig for theme and styleguide






No releases published


No packages published