generated from x-govuk/nhsuk-design-history-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheleventy.config.js
82 lines (77 loc) · 2.96 KB
/
eleventy.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
module.exports = function (eleventyConfig) {
// Options to customise the appearance of your design history
// https://x-govuk.github.io/govuk-eleventy-plugin/options/
eleventyConfig.addPlugin(require('@x-govuk/govuk-eleventy-plugin'), {
stylesheets: [
'/styles/application.css'
],
themeColour: '#005eb8',
icons: {
mask: 'mask-icon.svg',
shortcut: 'favicon.ico',
touch: 'apple-touch-icon.png'
},
opengraphImageUrl: 'opengraph-image.png',
headingPermalinks: true,
header: {
logotype: {
html: `<svg class="app-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 32" height="40" aria-hidden="true" focusable="false"><path fill="currentColor" d="M80 0v32H0V0h80ZM69 2.2c-5.8 0-11.6 2-11.6 8.8 0 7.4 10.2 5.8 10.2 10 0 2.6-3.4 3-5.6 3-2.2 0-5-.6-6.4-1.4L54 28c2.2.8 5.4 1.4 8 1.4 6.2 0 12.8-1.8 12.8-9 0-7.8-10.2-6.6-10.2-10.2 0-2.2 2.2-2.6 5-2.6 2.6 0 4.4.6 5.8 1.2L77 3.4c-1.8-.8-4.8-1.2-8-1.2ZM16.6 3H7.8L2.2 29h6.6l3.6-18h.2L18 29h8.6l5.6-26h-6.6L22 21h-.2L16.6 3Zm25.2 0h-7.2l-5.2 26h6.8l2.4-11.2h8.2L44.6 29h7L57 3h-7l-2.2 9.8h-8l2-9.8Z"/></svg>`,
},
productName: 'Screening design history',
search: {
indexPath: '/search.json',
sitemapPath: '/sitemap'
}
},
footer: {
meta: {
items: [
{
href: "https://github.com/NHSDigital/screening-design-history",
text: "Github source"
},
{
href: "/sitemap",
text: "Sitemap"
},
{
href: "/tags",
text: "Tags"
}
],
html: `<p class="app-footer--text">Made by the NHS with <a class="govuk-footer__link" href="https://github.com/x-govuk/nhsuk-design-history-template">X-GOVUK NHS design history template</a></p>
<p class="app-footer--text">All data and personal information shown in prototypes are fictional and for demonstration purposes only</p>`
},
copyright: {
text: '© NHS England'
},
contentLicence: false
},
url:
process.env.GITHUB_ACTIONS &&
'https://x-govuk.github.io/nhsuk-design-history-template/'
})
// Passthrough
eleventyConfig.addPassthroughCopy({ './app/images': '.' })
eleventyConfig.addCollection('explore-team', collection => {
return collection.getFilteredByGlob('app/posts/explore-team/**/*.md')
})
eleventyConfig.addCollection('manage-breast-screening', collection => {
return collection.getFilteredByGlob('app/posts/manage-breast-screening/**/*.md')
})
eleventyConfig.addCollection('bowel-screening', collection => {
return collection.getFilteredByGlob('app/posts/bowel-screening/**/*.md')
})
// Config
return {
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
dir: {
input: 'app',
layouts: '_layouts',
includes: '_components'
},
pathPrefix: process.env.GITHUB_ACTIONS ? '/screening-design-history/' : '/'
}
}