diff --git a/.eleventy.js b/.eleventy.js index a7202875..7181fd28 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -71,7 +71,7 @@ module.exports = function(eleventyConfig) { }); eleventyConfig.addFilter("postDate", (dateObj) => { - return DateTime.fromJSDate(dateObj).toLocaleString(DateTime.DATE_FULL); + return DateTime.fromJSDate(dateObj).toFormat('d MMMM yyyy'); }); // Used for tag page generation diff --git a/Dockerfile b/Dockerfile index 055a0f97..1a1b52d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,12 @@ FROM node:20.11.1-alpine AS build COPY . . RUN apk update && apk upgrade && \ - apk add --no-cache git + apk add --no-cache git tzdata -ENV SITE_ROOT "https://engineering.homeoffice.gov.uk/" +RUN ln -s /usr/share/zoneinfo/Europe/London /etc/localtime + +ENV SITE_ROOT="https://engineering.homeoffice.gov.uk/" \ + LANG="en_GB.UTF-8" RUN npm ci --omit=dev RUN npm run build diff --git a/package-lock.json b/package-lock.json index 67d45861..80529e31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "license": "MIT", "dependencies": { "@11ty/eleventy": "^2.0.1", - "@x-govuk/govuk-eleventy-plugin": "^6.1.0" + "@x-govuk/govuk-eleventy-plugin": "^6.1.0", + "luxon": "^3.4.4" }, "devDependencies": { "axe-core": "^4.8.4", @@ -3108,9 +3109,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -4365,9 +4366,9 @@ } }, "node_modules/luxon": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", - "integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", + "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==", "engines": { "node": ">=12" } @@ -9234,9 +9235,9 @@ } }, "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "optional": true }, "foreground-child": { @@ -10145,9 +10146,9 @@ "integrity": "sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==" }, "luxon": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", - "integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==" + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz", + "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==" }, "magic-string": { "version": "0.27.0", diff --git a/package.json b/package.json index 58618e8d..ee7235c5 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ }, "dependencies": { "@11ty/eleventy": "^2.0.1", - "@x-govuk/govuk-eleventy-plugin": "^6.1.0" + "@x-govuk/govuk-eleventy-plugin": "^6.1.0", + "luxon": "^3.4.4" }, "devDependencies": { "axe-core": "^4.8.4",