The GOV.UK prototype kit is the tool we use for rapidly creating HTML prototypes for GOV.UK services.
Why we stopped using Mustache
Mustache has dwindling support and isn’t powerful enough to do some of the things that users of the kit need to do. Nunjucks is backed by Mozilla and is powerful and extensible. You can check out some of the features here.
Perhaps the most immediately useful feature is the ability to pass data into includes (called macros in Nunjucks). For example, you could create a macro for doing sets of radio buttons. The macro would handle all the repetitive HTML, you’d just supply the labels.
We’ll include some example macros in a future release, once we have a better idea of what people would find useful. But for now we’d like everyone to have a play and share their work.
Upgrading your existing prototypes
If you want to upgrade your existing prototypes to use the latest version of the kit you'll need to convert your pages to use Nunjucks. It's pretty easy and we've included step by step instructions in the guide to upgrading your prototypes.
Loads of people have helped us get to v2.0.0, both inside and outside GDS. Extra special thanks go to Gemma Leigh, Joe Lanman, Ed Horsford and Rebecca Cottrell.