-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy patheleventy.config.js
60 lines (55 loc) · 1.72 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
import rssPlugin from '@11ty/eleventy-plugin-rss'
import govukEleventyPlugin from '@x-govuk/govuk-eleventy-plugin'
export default function (eleventyConfig) {
eleventyConfig.addPlugin(rssPlugin)
eleventyConfig.addPlugin(govukEleventyPlugin, {
icons: {
mask: 'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-mask-icon.svg?raw=true',
shortcut:
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-favicon.ico',
touch:
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-apple-touch-icon.png'
},
opengraphImageUrl:
'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-opengraph-image.png',
feedUrl: 'feed.xml',
homeKey: 'X-GOVUK',
titleSuffix: 'X-GOVUK',
url: process.env.GITHUB_ACTIONS && 'https://x-govuk.github.io/',
header: {
logotype: 'x-govuk'
},
footer: {
meta: {
items: [
{
href: '/feed.xml',
text: 'Subscribe to feed'
}
]
},
contentLicence: {
html: 'An unofficial community project. <a class="govuk-footer__link" href="https://github.com/x-govuk/x-govuk.github.io">GitHub source</a>.'
},
copyright: {
text: '© X-GOVUK'
}
}
})
// Collections
eleventyConfig.addCollection('post', (collection) => {
return collection.getFilteredByGlob('app/posts/*.md')
})
// Pass through
eleventyConfig.addPassthroughCopy('./app/assets')
return {
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
markdownTemplateEngine: 'njk',
dir: {
input: 'app',
data: 'data',
layouts: '../node_modules/@x-govuk/govuk-eleventy-plugin/layouts'
}
}
}