diff --git a/.eleventy.js b/.eleventy.js index 6835dd78..2c787f5d 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -37,6 +37,9 @@ module.exports = function (eleventyConfig) { // quiet build output eleventyConfig.setQuietMode(true) + eleventyConfig.setLiquidOptions({ + jsTruthy: true, + }) // tailwind watches eleventyConfig.addWatchTarget('./tailwind.config.js') @@ -49,24 +52,6 @@ module.exports = function (eleventyConfig) { // shortcodes eleventyConfig.addShortcode('version', () => now) - // filters - Object.keys(filters).forEach((filterName) => { - eleventyConfig.addLiquidFilter(filterName, filters[filterName]) - }) - - // date filters - Object.keys(dateFilters).forEach((filterName) => { - eleventyConfig.addLiquidFilter(filterName, dateFilters[filterName]) - }) - - // media filters - Object.keys(mediaFilters).forEach((filterName) => { - eleventyConfig.addLiquidFilter(filterName, mediaFilters[filterName]) - }) - - // css filters - eleventyConfig.addFilter('cssmin', (code) => new CleanCSS({}).minify(code).styles) - // enable merging of tags eleventyConfig.setDataDeepMerge(true) @@ -107,6 +92,24 @@ module.exports = function (eleventyConfig) { return md.render(content) }) + // filters + Object.keys(filters).forEach((filterName) => { + eleventyConfig.addLiquidFilter(filterName, filters[filterName]) + }) + + // date filters + Object.keys(dateFilters).forEach((filterName) => { + eleventyConfig.addLiquidFilter(filterName, dateFilters[filterName]) + }) + + // media filters + Object.keys(mediaFilters).forEach((filterName) => { + eleventyConfig.addLiquidFilter(filterName, mediaFilters[filterName]) + }) + + // css filters + eleventyConfig.addFilter('cssmin', (code) => new CleanCSS({}).minify(code).styles) + // image shortcode eleventyConfig.addShortcode('image', async function (src, alt, css, sizes, loading) { let metadata = await Image(src, { diff --git a/src/_includes/partials/footer.liquid b/src/_includes/partials/footer.liquid index d36adc10..3a3eecab 100644 --- a/src/_includes/partials/footer.liquid +++ b/src/_includes/partials/footer.liquid @@ -1,7 +1,7 @@