Skip to content

Commit

Permalink
Update to Eleventy v3 and update Eleventy plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Oct 11, 2024
1 parent 35dfdb9 commit ceae470
Show file tree
Hide file tree
Showing 5 changed files with 1,801 additions and 3,588 deletions.
46 changes: 0 additions & 46 deletions .eleventy.js

This file was deleted.

45 changes: 45 additions & 0 deletions eleventy.config.js
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/"
: "/",
};
}
Loading

0 comments on commit ceae470

Please sign in to comment.