Skip to content

Commit aa0cc79

Browse files
owenatgovdomoscargin
authored andcommitted
Merge pull request #587 from alphagov/v5-section
Add a v5 version of the frontend docs
2 parents c535810 + 728ea78 commit aa0cc79

29 files changed

Lines changed: 2511 additions & 29 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ Staticfile.auth
2525

2626
# Sassdocs generated files
2727
data/sassdoc.json
28+
data/sassdoc-v5.json
2829
data/sassdoc-v4.json

config.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ def markdown(content = nil)
3232
end
3333
end
3434

35+
page "v5/*", layout: :v5, data: { parent: "/v5/" }
3536
page "v4/*", layout: :v4, data: { parent: "/v4/" }
3637
page "*", data: { parent: "/" }

config/tech-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ show_contribution_banner: true
3838
github_repo: alphagov/govuk-frontend-docs
3939

4040
header_links:
41-
v5.x (Latest): /
41+
v6.x (Latest): /
42+
v5.x: /v5/
4243
v4.x: /v4/

netlify.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@
3030
for = "/assets/govuk/assets/fonts/*"
3131
[headers.values]
3232
Cache-Control = "public,max-age=2147483648,immutable"
33+
34+
[[redirects]]
35+
from = "/changes-to-govuk-frontend-v5/"
36+
to = "/v5/changes-to-govuk-frontend-v5/"
37+
status = 301

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
"start": "bundle exec middleman server",
77
"postinstall": "npm run build:sassdoc && npm run build:sassdocv4",
88
"build:sassdoc": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend/dist/govuk/ > data/sassdoc.json",
9+
"build:sassdocv5": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend-v5/dist/govuk/ > data/sassdoc-v5.json",
910
"build:sassdocv4": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend-v4/govuk/ > data/sassdoc-v4.json",
1011
"lint": "standard",
1112
"check-links": "hyperlink --canonicalroot https://frontend.design-system.service.gov.uk --internal --recursive build/index.html --skip 'property=\"og:image\"' | tee check-links.log | tap-mocha-reporter min"
1213
},
1314
"devDependencies": {
15+
1416
"govuk-frontend": "^6.0.0-beta.2",
17+
"govuk-frontend-v5": "npm:govuk-frontend@^5.14.0",
1518
"govuk-frontend-v4": "npm:govuk-frontend@^4.10.1",
1619
"hyperlink": "^5.0.4",
1720
"sassdoc": "^2.7.4",

source/brand-refresh-changes/index.html.md.erb

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,16 @@ weight: 4
77

88
In June 2025, GOV.UK started to refresh the brand across its products and services.
99

10-
The changes affect these components:
10+
## If you’re using GOV.UK Frontend v6 or later
1111

12-
- [GOV.UK header](https://design-system.service.gov.uk/components/header/)
13-
- [GOV.UK footer](https://design-system.service.gov.uk/components/footer/)
14-
- [Cookie banner](https://design-system.service.gov.uk/components/cookie-banner/)
15-
- [Service navigation](https://design-system.service.gov.uk/components/service-navigation/)
12+
You do not need to take any action. Your service is using the refreshed GOV.UK branding.
1613

17-
## If you’re using GOV.UK Frontend v5
14+
## If you’re using GOV.UK Frontend v5 or earlier
1815

19-
Update to the latest v5 release of GOV.UK Frontend. Follow the instructions in the [release notes for GOV.UK Frontend v5.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) to enable the new brand.
16+
We recommend upgrading to the latest version of GOV.UK Frontend as soon as possible to get the most up to date iteration of the GOV.UK brand.
2017

21-
## If you’re using GOV.UK Frontend v4
18+
Read our [guidance on staying up to date with changes on GOV.UK Frontend](../staying-up-to-date/) for ways and benefits of knowing when we release new versions of GOV.UK Frontend.
2219

23-
Update to the latest v4 release of GOV.UK Frontend. Follow the instructions in the [release notes for GOV.UK Frontend v4.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.10.0) to enable the new brand.
20+
### If you cannot upgrade or are not using GOV.UK Frontend
2421

25-
## If you’re using GOV.UK Frontend v1, v2 or v3
26-
27-
If you're either:
28-
29-
- still migrating from GOV.UK Template, GOV.UK Frontend Toolkit or GOV.UK Elements
30-
- required to continue to fully support Internet Explorer 11 or other earlier browsers
31-
32-
Update to the latest v4 release of GOV.UK Frontend. Follow the instructions in the [release notes for GOV.UK Frontend v4.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.10.0) to enable the new brand.
33-
34-
Otherwise, update to the latest v5 release of GOV.UK Frontend, and then follow the instructions in the [release notes for GOV.UK Frontend v5.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) to enable the new brand.
35-
36-
Follow the instructions in all the release notes from the version you are currently using, up to and including the version you are updating to. Pay particular attention to the release notes for any major releases.
37-
38-
For help understanding which version you're currently using, and for more guidance on updating between major versions, see [staying up to date with changes](../staying-up-to-date/#how-the-version-numbering-works).
39-
40-
## If you’re not using GOV.UK Frontend
41-
42-
If you’ve not yet started migrating from GOV.UK Template, GOV.UK Frontend Toolkit and GOV.UK Elements, see our [guidance on migrating from our old frameworks](../v4/migrating-from-legacy-products/).
22+
Read the [GOV.UK Frontend v5 guidance on the brand refresh](/v5/brand-refresh-changes/).

source/layouts/v5.erb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<%
2+
wrap_layout :core do
3+
html = yield
4+
5+
content_for(:toc_module, "in-page-navigation")
6+
7+
# For v5 pages, we only want the pages under the `v5` folder
8+
resources = sitemap.resources.select do |r|
9+
r.path.start_with?('v5/')
10+
end
11+
12+
content_for :sidebar do
13+
# Because all the pages for `v5` are children of `v5/index.html`,
14+
# they'd appear as items under the v5 index in the sidebar, which we don't want
15+
# so we exclude the rendering of child pages for the v5 index page
16+
v5_index = resources.find{ |r| r.path == 'v5/index.html' }
17+
18+
with_page_in_navigation(v5_index) do
19+
without_child_pages_for(v5_index) do
20+
render_page_tree(resources, current_page, config, html)
21+
end
22+
end
23+
end
24+
25+
html
26+
end %>

source/v5-0-announcement/index.html.md.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ prevent_indexing: true
77

88
# What upcoming changes to GOV.UK Frontend mean for your digital teams
99

10-
This page has been archived. See [Changes to GOV.UK Frontend v5.0.0](/changes-to-govuk-frontend-v5/) for more information.
10+
This page has been archived. See [Changes to GOV.UK Frontend v5.0.0](../v5/changes-to-govuk-frontend-v5/) for more information.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Updating your service to use the new brand
3+
weight: 4
4+
---
5+
6+
# Updating your service to use the new brand
7+
8+
In June 2025, GOV.UK started to refresh the brand across its products and services.
9+
10+
The changes affect these components:
11+
12+
- [GOV.UK header](https://design-system.service.gov.uk/components/header/)
13+
- [GOV.UK footer](https://design-system.service.gov.uk/components/footer/)
14+
- [Cookie banner](https://design-system.service.gov.uk/components/cookie-banner/)
15+
- [Service navigation](https://design-system.service.gov.uk/components/service-navigation/)
16+
17+
## If you’re using GOV.UK Frontend v5
18+
19+
Update to the latest v5 release of GOV.UK Frontend. Follow the instructions in the [release notes for GOV.UK Frontend v5.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) to enable the new brand.
20+
21+
## If you’re using GOV.UK Frontend v4
22+
23+
Update to the latest v4 release of GOV.UK Frontend. Follow the instructions in the [release notes for GOV.UK Frontend v4.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.10.0) to enable the new brand.
24+
25+
## If you’re using GOV.UK Frontend v1, v2 or v3
26+
27+
If you're either:
28+
29+
- still migrating from GOV.UK Template, GOV.UK Frontend Toolkit or GOV.UK Elements
30+
- required to continue to fully support Internet Explorer 11 or other earlier browsers
31+
32+
Update to the latest v4 release of GOV.UK Frontend. Follow the instructions in the [release notes for GOV.UK Frontend v4.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v4.10.0) to enable the new brand.
33+
34+
Otherwise, update to the latest v5 release of GOV.UK Frontend, and then follow the instructions in the [release notes for GOV.UK Frontend v5.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) to enable the new brand.
35+
36+
Follow the instructions in all the release notes from the version you are currently using, up to and including the version you are updating to. Pay particular attention to the release notes for any major releases.
37+
38+
For help understanding which version you're currently using, and for more guidance on updating between major versions, see [staying up to date with changes](../staying-up-to-date/#how-the-version-numbering-works).
39+
40+
## If you’re not using GOV.UK Frontend
41+
42+
If you’ve not yet started migrating from GOV.UK Template, GOV.UK Frontend Toolkit and GOV.UK Elements, see our [guidance on migrating from our old frameworks](/v4/migrating-from-legacy-products/).

0 commit comments

Comments
 (0)