Skip to content

alphagov/static

Repository files navigation

Static

This application defines global templates for GOV.UK pages. It is used in conjunction with Slimmer, which is Rack middleware that takes a HTML response from a Rails app and combines it with a template from Static.

Live examples

See this gem_layout template screenshot for an example of the page furniture Static provides.

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

You can use the GOV.UK Docker environment to run the the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.

Running the app

Static has no home page or navigation, so you need to manually type in the URL of the template you want to view. Here's an example:

http://static.dev.gov.uk/templates/gem_layout.html.erb

See the list of Slimmer templates for more.

If you're making front end changes to Static and testing them out inside your other apps, you may find that it takes several minutes for changes to appear due to caching in Slimmer. Restarting the consumer app should pick up the changes.

Running the test suite

bundle exec rake

To run JavaScript tests (only):

env RAILS_ENV=test bundle exec rake jasmine

Further documentation

Background information:

How to's:

Licence

MIT License