diff --git a/.eleventy.js b/.eleventy.js index 9d6487d..a8eddbe 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -12,6 +12,11 @@ module.exports = function(eleventyConfig) { return DateTime.fromJSDate(dateObj).toFormat("dd LLL yyyy"); }); + // Get the first `n` elements of a collection. + eleventyConfig.addFilter("head", (array, n) => { + return array.slice(0, n); + }); + // https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string eleventyConfig.addFilter('htmlDateString', (dateObj) => { return DateTime.fromJSDate(dateObj).toFormat('yyyy-LL-dd'); diff --git a/archive.njk b/archive.njk new file mode 100644 index 0000000..235fd75 --- /dev/null +++ b/archive.njk @@ -0,0 +1,12 @@ +--- +layout: layouts/home.njk +tags: + - nav +navtitle: Archive +permalink: posts/index.html +--- + +
More posts can be found in the blog archive.