Add option to use GOV.UK Design System components#443
Merged
jamescarr28 merged 4 commits intorelease/v6-1-0-betafrom Apr 3, 2026
Merged
Add option to use GOV.UK Design System components#443jamescarr28 merged 4 commits intorelease/v6-1-0-betafrom
jamescarr28 merged 4 commits intorelease/v6-1-0-betafrom
Conversation
This was referenced Mar 24, 2026
# Conflicts: # CHANGELOG.md # lib/govuk_tech_docs/version.rb # package-lock.json
# Conflicts: # CHANGELOG.md # lib/govuk_tech_docs/version.rb
Contributor
Author
|
merged into release 6.1.0.beta branch - #458 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What’s changed
I have added a custom extension and renderer to load in gov.uk nunjucks components. They will call these in the same way documented on the design system documentation.
The extension will recogniser any function call that has the prefix
govukand pass the call and any data to the renderer. If the template is not known then the relevant error will be passed back up the chain.Users can disable this by setting adding
enable_govuk_components: falseinconfig/tech-docs.yaml.Identifying a user need
There are examples around existing tech docs of users creating their own hard coded copies of gov.uk extensions for example:
There are others, and likely ones that we don't have visibility of.
These do not get updated with new releases of the design system, and need manul maintenance.
This will expand the tech-docs-gem to enable using user and accessibility tested components, while discouraging custom html. It also supports consistent gov.uk documentation, while enabling flexibility to create templates that better suit individual requirements.
And if nothing else, we say we do it here but at the moment, we don't...