Skip to content

Commit dae4734

Browse files
Implement X-GOVUK rebrand
1 parent abc68d1 commit dae4734

File tree

6 files changed

+327
-914
lines changed

6 files changed

+327
-914
lines changed

app/assets/application.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Use GOV.UK Frontend components
2+
$_font-family: system-ui, sans-serif;
3+
@use "pkg:govuk-frontend/dist/govuk" with (
4+
$govuk-global-styles: true,
5+
$govuk-new-organisation-colours: true,
6+
$govuk-new-typography-scale: true,
7+
$govuk-font-family: $_font-family,
8+
$govuk-brand-colour: #2288aa,
9+
$govuk-link-colour: #006688,
10+
$govuk-link-hover-colour: #004466,
11+
$govuk-link-visited-colour: #333366
12+
);
13+
14+
// Use GOV.UK Eleventy Plugin components
15+
@use "pkg:@x-govuk/govuk-eleventy-plugin";

app/posts/feed.njk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
eleventyExcludeFromCollections: true
33
layout: feed
44
permalink: /feed.xml
5-
pagination:
6-
data: collections.post
7-
size: 20
8-
reverse: true
5+
collection:
6+
name: post
7+
limit: 20
98
---

app/sass/_settings.scss

Lines changed: 0 additions & 6 deletions
This file was deleted.

eleventy.config.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
import rssPlugin from '@11ty/eleventy-plugin-rss'
2-
import govukEleventyPlugin from '@x-govuk/govuk-eleventy-plugin'
1+
import { govukEleventyPlugin } from '@x-govuk/govuk-eleventy-plugin'
32

4-
export default function (eleventyConfig) {
5-
eleventyConfig.addPlugin(rssPlugin)
3+
const serviceName = 'X-GOVUK'
64

5+
export default function (eleventyConfig) {
76
eleventyConfig.addPlugin(govukEleventyPlugin, {
87
icons: {
9-
mask: 'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-mask-icon.svg?raw=true',
8+
mask: 'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-icon-mask.svg?raw=true',
109
shortcut:
11-
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-favicon.ico',
10+
'https://raw.githubusercontent.com/x-govuk/logo/main/images/favicon.ico',
1211
touch:
13-
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-apple-touch-icon.png'
12+
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-icon-180.png'
1413
},
1514
opengraphImageUrl:
1615
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-opengraph-image.png',
17-
feedUrl: 'feed.xml',
18-
homeKey: 'X-GOVUK',
19-
titleSuffix: 'X-GOVUK',
16+
themeColor: '#2288aa',
17+
titleSuffix: serviceName,
18+
homeKey: serviceName,
19+
showBreadcrumbs: false,
20+
headingPermalinks: true,
2021
url: process.env.GITHUB_ACTIONS && 'https://x-govuk.github.io/',
21-
header: {
22-
logotype: 'x-govuk'
23-
},
22+
stylesheets: ['/assets/application.css'],
2423
footer: {
2524
meta: {
2625
items: [
@@ -36,7 +35,8 @@ export default function (eleventyConfig) {
3635
copyright: {
3736
text: '© X-GOVUK'
3837
}
39-
}
38+
},
39+
rebrand: true
4040
})
4141

4242
// Collections
@@ -47,14 +47,16 @@ export default function (eleventyConfig) {
4747
// Pass through
4848
eleventyConfig.addPassthroughCopy('./app/assets')
4949

50+
// Enable X-GOVUK brand
51+
eleventyConfig.addNunjucksGlobal('xGovuk', true)
52+
5053
return {
5154
dataTemplateEngine: 'njk',
5255
htmlTemplateEngine: 'njk',
5356
markdownTemplateEngine: 'njk',
5457
dir: {
5558
input: 'app',
56-
data: 'data',
57-
layouts: '../node_modules/@x-govuk/govuk-eleventy-plugin/layouts'
59+
data: 'data'
5860
}
5961
}
6062
}

0 commit comments

Comments
 (0)