Skip to main content

Application: publisher

Publishes mainstream content on GOV.UK

Example pages published by publisher

README

Publisher is sometimes referred to as “mainstream publisher”.

Live examples

Retired formats

  • Campaign
  • Programme
  • Video
  • Licence (Migrated to Specialist Licence Finder)

Removed formats

  • Business Support - used to be retired, and the documents remained visible, now they’re fully removed as editions and no longer visible in the app (although the artefacts do still exist). They have been fully migrated to specialist-publisher.

Nomenclature

  • Artefact: a document on GOV.UK.

Technical documentation

This is a Rails application and should follow our Rails app conventions.

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

Use GOV.UK Docker to run any commands that follow.

Testing

The default rake task runs all the tests:

bundle exec rake

State machine

Maps out the transitions between states for the Edition class. These transitions are defined in the workflow module. A diagram of the current state machine can be seen here: state machine diagram. The diagram can be (re)generated using the state_machines-graphviz gem, by doing:

bundle exec rake state_machines:draw CLASS=Edition TARGET=docs

This will generate a diagram in the docs/state_machines folder.

Querying the database of a deployed publisher app

Publisher stores its data in DocumentDB, which can’t be queried using the instructions detailed in the GOV.UK developer docs. Instead, follow these instructions for querying the database.

Feature flags

For details on how feature flags are managed in Publisher, see the feature flags documentation.

Adding promotions to Completed Transactions

For instructions on how to add a new type of promotion to Completed Transactions, see the “adding a promotion” documentation.

Further documentation

Working with Service Sign In pages

These pages do not have an admin interface and are instead managed through rake tasks.

See the README for more details.

Licence

MIT License