-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Eleventy v3 and update Eleventy plugin
- Loading branch information
1 parent
35dfdb9
commit ceae470
Showing
5 changed files
with
1,801 additions
and
3,588 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import govukEleventyPlugin from "@x-govuk/govuk-eleventy-plugin"; | ||
|
||
export default function (eleventyConfig) { | ||
// Register the plugin | ||
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", | ||
}, | ||
url: process.env.GITHUB_ACTIONS | ||
? "https://x-govuk.github.io/govuk-rspec-helpers/" | ||
: "/", | ||
header: { | ||
logotype: "x-govuk", | ||
}, | ||
titleSuffix: "X-GOVUK", | ||
footer: { | ||
contentLicence: { | ||
html: 'Licensed under the <a class="govuk-footer__link" href="https://github.com/x-govuk/govuk-prototype-components/blob/main/LICENSE.txt">MIT Licence</a>, except where otherwise stated', | ||
}, | ||
copyright: { | ||
text: "© X-GOVUK", | ||
}, | ||
}, | ||
}); | ||
|
||
// Passthrough | ||
eleventyConfig.addPassthroughCopy("./assets"); | ||
|
||
return { | ||
dataTemplateEngine: "njk", | ||
htmlTemplateEngine: "njk", | ||
markdownTemplateEngine: "njk", | ||
dir: { | ||
// Use layouts from the plugin | ||
layouts: "node_modules/@x-govuk/govuk-eleventy-plugin/layouts", | ||
}, | ||
pathPrefix: process.env.GITHUB_ACTIONS | ||
? "/govuk-services-frontend-stats/" | ||
: "/", | ||
}; | ||
} |
Oops, something went wrong.