travel-advice-publisher: # Further technical information
Further technical information
The list of countries is defined in
Each country can have one or more editions. At any one time, there can be a single edition in draft, a single published edition and any number of archived editions. When an edition is published, the existing published edition will be archived.
When published, unless the 'minor update' checkbox is checked, a change description must be provided. This is exposed in the API response and the frontend.
Adding or renaming a country
To add or rename a country, update the
lib/data/countries.yml file. You will then need to:
- Publish the content item for the country to Publishing API
- Publish the email signup content item for the country to Publishing API
lib/tasks/publishing_api.rake for details of how to do this.
To maintain the history of a country when renaming you will need to perform a migration on TravelAdviceEdition.
Removing a country
If a country's foreign travel advice is being subsumed into another country's page:
- Run the
publishing_api:unpublish_published_edition_and_email_signup_content_item['country_slug', 'new_country_slug']rake task, providing the slug of the country being removed, and the slug of the country that it should be redirected to.
- Remove the country from the
Travel advice content reaches the content-store via the publishing-api, editorial work is batch-enqueued with Sidekiq for processing out of request. Processing of travel-advice publishing-api jobs is made visible via the sidekiq-monitoring application.
Email Alert API
Link Checker API
link-checker-api has been integrated on the edit page for TravelAdviceEditions. It extracts all links from within any Govspeak fields and sends them to the
/batch endpoint of the API. In this request it also sends across a
webhook_callback which then populates any information about broken/warning links. More reading about the endpoints can be found here.
Changes to Travel Advice content will update our search index via Rummager.