diff --git a/.eleventy.js b/.eleventy.js index 5b91fc6..7aaf7ad 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -13,8 +13,8 @@ const markdownItOptions = { } const parseDate = (date) => typeof date === 'string' ? - DateTime.fromISO(date) : - DateTime.fromJSDate(date, {zone: 'utc'}) + DateTime.fromISO(date).setZone("Europe/Paris") : + DateTime.fromJSDate(date, {zone: 'utc'}).setZone("Europe/Paris") async function imageShortcode(src, alt, sizes) { let metadata = await Image(src, { @@ -64,6 +64,9 @@ module.exports = function(eleventyConfig) { eleventyConfig.addFilter('htmlDateString', (dateObj) => { return parseDate(dateObj).toFormat('yyyy-LL-dd'); }); + eleventyConfig.addFilter('htmlDateTimeISO', (dateObj) => { + return parseDate(dateObj).toISO(); + }); // Get the first `n` elements of a collection. eleventyConfig.addFilter("head", (array, n) => { diff --git a/src/_includes/layouts/base.njk b/src/_includes/layouts/base.njk index 756d3ee..fe15a5e 100644 --- a/src/_includes/layouts/base.njk +++ b/src/_includes/layouts/base.njk @@ -1,65 +1,29 @@ ---- -layout: layouts/html.njk ---- - - - Compagnie Kalimat - - - - + {{ title or metadata.title or "Compagnie Kalimat" }} + {% if description %}{% endif %} - + - + {% if description %}{% endif %} - - - + + + - - - + {% if description %}{% endif %} + - - - - - - - - - - - - - -