diff --git a/.eleventy.js b/.eleventy.js index 7927572..f74df0b 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -2,6 +2,12 @@ const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); module.exports = (eleventyConfig) => { eleventyConfig.addPassthroughCopy('assets'); + + eleventyConfig.addCollection('post', (collection) => { + // reversed all collections posts + return collection.getFilteredByGlob('posts/**/*.md').reverse(); + }); + eleventyConfig.addFilter('readableDate', (dateObj) => { const date = new Date(dateObj); date.setMinutes(date.getMinutes() + date.getTimezoneOffset()); @@ -11,13 +17,15 @@ module.exports = (eleventyConfig) => { year: 'numeric', }); }); + eleventyConfig.addPlugin(syntaxHighlight); + return { dir: { input: './', output: './_site', layouts: './_layouts', }, - templateFormats: ['html', 'liquid', 'md', 'njk'], + templateFormats: ['html', 'md'], }; }; diff --git a/404.html b/404.html index 3b4315e..419c102 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,5 @@ --- +eleventyExcludeFromCollections: true title: Not Found permalink: 404.html layout: default diff --git a/index.njk b/index.html similarity index 82% rename from index.njk rename to index.html index 62516a2..62fdbe2 100644 --- a/index.njk +++ b/index.html @@ -1,16 +1,16 @@ --- layout: default --- -