From ba7a151749c47d5296498074aa97c00f1ff6083f Mon Sep 17 00:00:00 2001 From: Cassie Jones Date: Wed, 6 Nov 2019 20:07:13 -0500 Subject: [PATCH] Change date formatter to fix timezones --- .eleventy.js | 4 ++-- package-lock.json | 27 +++++++++------------------ package.json | 2 +- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index db36b0f..896b73f 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,11 +1,11 @@ const pluginRss = require("@11ty/eleventy-plugin-rss"); const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); const Nunjucks = require("nunjucks"); -const nunjucksDate = require("nunjucks-date"); +const dateFilter = require("nunjucks-date-filter"); const md = require("markdown-it")(); module.exports = (eleventyConfig) => { - eleventyConfig.addNunjucksFilter('date', nunjucksDate); + eleventyConfig.addNunjucksFilter('date', dateFilter); eleventyConfig.addPlugin(pluginRss); eleventyConfig.addPlugin(pluginSyntaxHighlight); diff --git a/package-lock.json b/package-lock.json index 369e814..ef07624 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3560,24 +3560,16 @@ } }, "markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", + "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", "dev": true, "requires": { "argparse": "^1.0.7", - "entities": "~2.0.0", + "entities": "~1.1.1", "linkify-it": "^2.0.0", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" - }, - "dependencies": { - "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", - "dev": true - } } }, "maximatch": { @@ -3932,14 +3924,13 @@ "yargs": "^3.32.0" } }, - "nunjucks-date": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/nunjucks-date/-/nunjucks-date-1.4.0.tgz", - "integrity": "sha512-N4zafAXryCwNi2xy9vSgkXhmW8Bb6WDBaTC7JxSmmIZKStqijp/jxmLj67fRfYRWbbJAwiJeJT4FrP/6MvyOSA==", + "nunjucks-date-filter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/nunjucks-date-filter/-/nunjucks-date-filter-0.1.1.tgz", + "integrity": "sha1-qTbUTSzJiY2Vxqt7KrpwhPpgq6Y=", "dev": true, "requires": { - "moment": "*", - "nunjucks": "^3.x" + "moment": "^2.9.0" } }, "object-assign": { diff --git a/package.json b/package.json index 3b4a808..840ef9e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@11ty/eleventy-plugin-rss": "^1.0.7", "@11ty/eleventy-plugin-syntaxhighlight": "file:../../oss/eleventy-plugin-syntaxhighlight", "markdown-it": "^8.4.2", - "nunjucks-date": "^1.4.0" + "nunjucks-date-filter": "^0.1.1" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" -- 2.47.0