Skip to content

GOV.UK Frontend

This project uses the GOV.UK Frontend Jinja Macros package for the component templates. This means that we can generate Django objects that are renderable with up to date GDS markup.

Adding/updating components

To clear the generated components run the following command:

make clear-generated-components

To generate components run the following command:

make generate-components

Note that the generate-componets command will skip over any components that already exist.

If there are new Jinja templates available, run the following command to update the dependencies and generate the components:

make upgrade-components GOVUK_FRONTEND_VERSION=v4.6.0 GOVUK_FRONTEND_JINJA_VERSION=2.6.0

This command will upgrade the GOV.UK Frontend Jinja Macros package to the specified version and then generate the components using the component yaml files from the GOV.UK Frontend using the specified version.