From 933b2886d116a5449d12c477261dee74cc59d68a Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Sat, 8 Jan 2022 14:35:24 -0600 Subject: [PATCH] Update to Eleventy 1.0 --- .eleventy.js | 26 ++++++++++---------------- package.json | 14 +++++++------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 16841f2..6a939c3 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -7,14 +7,15 @@ const markdownIt = require("markdown-it"); const markdownItAnchor = require("markdown-it-anchor"); module.exports = function(eleventyConfig) { + // Copy the `img` and `css` folders to the output + eleventyConfig.addPassthroughCopy("img"); + eleventyConfig.addPassthroughCopy("css"); + // Add plugins eleventyConfig.addPlugin(pluginRss); eleventyConfig.addPlugin(pluginSyntaxHighlight); eleventyConfig.addPlugin(pluginNavigation); - // https://www.11ty.dev/docs/data-deep-merge/ - eleventyConfig.setDataDeepMerge(true); - // Alias `layout: post` to `layout: layouts/post.njk` eleventyConfig.addLayoutAlias("post", "layouts/post.njk"); @@ -60,10 +61,6 @@ module.exports = function(eleventyConfig) { return filterTagList([...tagSet]); }); - // Copy the `img` and `css` folders to the output - eleventyConfig.addPassthroughCopy("img"); - eleventyConfig.addPassthroughCopy("css"); - // Customize Markdown library and settings: let markdownLibrary = markdownIt({ html: true, @@ -108,6 +105,12 @@ module.exports = function(eleventyConfig) { "liquid" ], + // Pre-process *.md files with: (default: `liquid`) + markdownTemplateEngine: "njk", + + // Pre-process *.html files with: (default: `liquid`) + htmlTemplateEngine: "njk", + // ----------------------------------------------------------------- // If your site deploys to a subdirectory, change `pathPrefix`. // Don’t worry about leading and trailing slashes, we normalize these. @@ -122,15 +125,6 @@ module.exports = function(eleventyConfig) { pathPrefix: "/", // ----------------------------------------------------------------- - // Pre-process *.md files with: (default: `liquid`) - markdownTemplateEngine: "njk", - - // Pre-process *.html files with: (default: `liquid`) - htmlTemplateEngine: "njk", - - // Opt-out of pre-processing global data JSON files: (default: `liquid`) - dataTemplateEngine: false, - // These are all optional (defaults are shown): dir: { input: ".", diff --git a/package.json b/package.json index 9b1d216..73c23ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eleventy-base-blog", - "version": "5.0.2", + "version": "6.0.0", "description": "A starter repository for a blog web site using the Eleventy static site generator.", "scripts": { "build": "eleventy", @@ -24,12 +24,12 @@ }, "homepage": "https://github.com/11ty/eleventy-base-blog#readme", "devDependencies": { - "@11ty/eleventy": "^0.12.1", + "@11ty/eleventy": "^1.0.0", "@11ty/eleventy-navigation": "^0.3.2", - "@11ty/eleventy-plugin-rss": "^1.1.1", - "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.2", - "luxon": "^1.26.0", - "markdown-it": "^12.1.0", - "markdown-it-anchor": "^8.1.2" + "@11ty/eleventy-plugin-rss": "^1.1.2", + "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.3", + "luxon": "^2.3.0", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1" } }