At present this generates 9 output formats:
- a gem containing a Rails engine
- a tarball containing Play Framework templates
- a folder containing Mustache templates
- a tarball containing Liquid templates
- a tarball containing Mustache Inheritance templates
- a tarball containing Jinja templates
- a tarball containing plain HTML and assets
- a tarball containing EJS (Embedded JavaScript) templates
- a JAR file containing assets (but no templates) structured as per WebJars
- a tarball containing Django templates
This is available on rubygems.org. To use it, add this line to your application's Gemfile:
gem 'govuk_template'
And then execute:
$ bundle
You can then use the govuk_template
layout in your app. If you need to extend the layout you can use nested layouts.
To generate the tarball of Play Framework templates run bundle exec rake build:play
. This will produce a tarball in the pkg
directory.
To generate the folder of Mustache templates run bundle exec rake build:mustache
. This will produce a folder in the pkg
directory.
To generate the folder of Liquid templates run bundle exec rake build:liquid
. This will produce a tarball in the pkg
directory.
There is a proposal for Mustache to support template inheritance this is supported in both the mustache.java
and the hogan.js
implementations of Mustache.
To generate the tarball of the Mustache Inheritance templates run the build:mustache_inheritance
rake task. This will produce a tarball in the pkg
directory.
To generate the folder of Jinja templates run bundle exec rake build:jinja
. This will produce a tarball in the pkg
directory.
To generate the tarball, run the bundle exec rake build:tar
. This will produce a tarball in the pkg
directory.
To generate the folder of Embedded JavaScript templates run bundle exec rake build:ejs
. This will produce a tarball in the pkg
directory.
To generate a JAR file of assets in WebJar format run bundle exec rake build:webjar
. This will produce a JAR file in the pkg
directory.
To generate the folder of Django templates run bundle exec rake build:django
. This will produce a tarball in the pkg
directory.