-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy patheleventy.config.js
More file actions
129 lines (113 loc) · 4.79 KB
/
eleventy.config.js
File metadata and controls
129 lines (113 loc) · 4.79 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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: 'Digital prevention services design history',
organisationName: "NHS Digital prevention services design history",
search: {
indexPath: '/search.json',
sitemapPath: '/sitemap'
}
},
footer: {
meta: {
items: [
{
href: "https://github.com/NHSDigital/prevention-services-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://design-history.prevention-services.nhs.uk/'
})
// Passthrough
eleventyConfig.addPassthroughCopy({ './app/images': '.' })
// Screening collections
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")
})
eleventyConfig.addCollection("manage-your-screening", (collection) => {
return collection.getFilteredByGlob("app/posts/manage-your-screening/**/*.md")
})
// eleventyConfig.addCollection('hpv-self-sampling', collection => {
// return collection.getFilteredByGlob('app/posts/hpv-self-sampling/**/*.md')
// })
// Vaccination collections
eleventyConfig.addCollection('book-a-vaccination', collection => {
return collection.getFilteredByGlob('app/posts/book-a-vaccination/**/*.md')
})
eleventyConfig.addCollection('manage-your-appointments', collection => {
return collection.getFilteredByGlob('app/posts/manage-your-appointments/**/*.md')
})
eleventyConfig.addCollection('record-a-vaccination', collection => {
return collection.getFilteredByGlob('app/posts/record-a-vaccination/**/*.md')
})
eleventyConfig.addCollection('select-people-for-invitation', collection => {
return collection.getFilteredByGlob('app/posts/select-people-for-invitation/**/*.md')
})
// Personalised prevention collections
eleventyConfig.addCollection('digital-nhs-health-check', collection => {
return collection.getFilteredByGlob('app/posts/digital-nhs-health-check/**/*.md')
})
eleventyConfig.addCollection('personalised-prevention-platform', collection => {
return collection.getFilteredByGlob('app/posts/personalised-prevention-platform/**/*.md')
})
eleventyConfig.addCollection('talking-therapies', collection => {
return collection.getFilteredByGlob('app/posts/talking-therapies/**/*.md')
})
eleventyConfig.addCollection('smoking-cessation', collection => {
return collection.getFilteredByGlob('app/posts/smoking-cessation/**/*.md')
})
eleventyConfig.addCollection('guide', collection => {
return collection.getFilteredByGlob('app/guide/**/*.md')
})
// Config
return {
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
dir: {
input: 'app',
layouts: '_layouts',
includes: '_components'
}
}
}