Skip to main content
Warning This document has not been updated for a while now. It may be out of date.
Last updated: 27 Jul 2023

Add a new document type

The document type describes what a page on GOV.UK looks like.

Add the document type in the govuk-content-schema repo

You need to add the document type into the allowed document types in publishing api. Once you have added the document type you should:

  • Commit the change
  • Run bundle exec rake to generate the schemas again
  • Commit this update separately

Examples of implementation (note that these examples are for the retired govuk-content-schemas repo: please add examples of adding to publishing api when these are available):

Add a new content schema

If your document type needs a new content schema, see “Adding a new schema”.

If your document type should be available in search results, see “Make a new document type available to search”.

Create a new Rake task in the publishing app

If your new document type will be published as a static route (rather than from a publishing app), you’ll need to create a Rake task to publish the route using the new document type.

Before you begin, you must identify which publishing and rendering applications will use the document type. You need to include these as parameters (payload) when you generate the route.

See “Publish special routes” for more information.

Note: having a document type with placeholder prefix will not publish routes. Read more about placeholder items.