/whitehall

Publishes government content on GOV.UK

Primary LanguageRubyMIT LicenseMIT

Whitehall App

"Whitehall" is the code name for the Inside Government project, which aims to bring Government departments online in a consistent and user-friendly manner. Documentation can be found on rdoc.

Nomenclature

  • Govspeak A variation of Markdown used throughout 'Whitehall' as the general publishing format

Technical Documentation

Whitehall is a Rails 5 app built on a MySQL database. It is deployed in two modes, 'admin' for publishers to create and manage content and 'frontend' for rendering content under https://www.gov.uk/government. In addition to storing and managing its own content database Whitehall also updates various other APIs including search and is currently being migrated towards a new publishing model utilising Publishing API and Content Store.

Dependencies

  • Xcode (for the Command Line Tools xcode-select --install)
  • Ruby 2.2.3
  • Rubygems and Bundler
  • MySQL
  • Imagemagick and Ghostscript (for generating thumbnails of uploaded PDFs)
  • xpdf (first download XQuartz)
  • PhantomJS (for running the Javascript tests)

Dependencies on Whitehall APIs

The following applications have dependencies on Whitehall APIs:

Running the application

The application can be started with

bundle exec rails s

Note that the application itself will respond to requests on the root URL / with a routing error. To check that it works, try visiting /government/admin and /government/organisations.

Further setup instructions are available in the detailed setup guide

Running the test suite

See the testing guide

Assets

GOV.UK shares assets (eg stylesheets and JavaScript) across apps using the slimmer gem and the static app.

See the local asset setup guide

Search

The Whitehall app relies on Rummager for document indexing, and the GOV.UK frontend application to serve results.

See the search setup guide

How to publish a finder in whitehall

  • You will need to create a JSON file in the whitehall repository, under whitehall/lib/finders
  • You can base it on one of the existing files in that folder
  • Double-check the filter format and document noun - the filter format is used for rummager to return the data, while the document noun is displayed to the user
  • The default_documents_per_page key can be used to paginate very long finders (see whitehall/lib/finders/case_studies.json for an example)
  • Running the finders:publish rake task will publish your new finder to the publishing-api, the the route defined in the JSON will be taken over by finder-frontend

Other guides

Contributing guide

Timestamps

Internationalisation

Migration sync checks

Generating the documentation

We use YARD for the documentation. You can generate a local copy with:

yard server --reload

You can also read the docs on rdoc.info.

Licence

MIT License