Skip to content

alphagov/static

Folders and files

NameName
Last commit message
Last commit date
Jul 19, 2024
Apr 6, 2023
Dec 11, 2024
Sep 13, 2024
Oct 31, 2024
Dec 4, 2011
Jun 19, 2024
Oct 31, 2024
Dec 4, 2011
Sep 13, 2024
May 15, 2020
Jul 9, 2024
Oct 31, 2024
Jan 4, 2012
Sep 11, 2015
Jan 31, 2024
Dec 19, 2023
Mar 9, 2020
May 17, 2024
Apr 6, 2023
May 17, 2024
Dec 13, 2024
Dec 19, 2024
Mar 6, 2015
Feb 16, 2018
Feb 9, 2024
Jun 19, 2024
May 23, 2022
Feb 16, 2018
May 8, 2017
Dec 3, 2024
Dec 10, 2024

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