@chrisburnell/eleventy-cache-webmentions 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,6 @@ const sanitizeHTML = require("sanitize-html")
3
3
  const uniqBy = require("lodash/uniqBy")
4
4
  const { AssetCache } = require("@11ty/eleventy-cache-assets")
5
5
 
6
- // Load .env variables with dotenv
7
- require("dotenv").config()
8
6
  const TOKEN = process.env.WEBMENTION_IO_TOKEN
9
7
 
10
8
  const absoluteURL = (url, domain) => {
@@ -181,9 +179,14 @@ module.exports = (eleventyConfig, options = {}) => {
181
179
  throw new Error("domain is a required option to be passed when adding the plugin to your eleventyConfig using addPlugin.")
182
180
  }
183
181
 
182
+ // Liquid/Nunjucks Filters
184
183
  eleventyConfig.addLiquidFilter("getWebmentions", getWebmentionsFilter)
185
184
  eleventyConfig.addNunjucksAsyncFilter("getWebmentions", getWebmentionsFilter)
185
+
186
+ // Eleventy Data
187
+ eleventyConfig.addGlobalData("webmentions", filteredWebmentions)
186
188
  } else {
189
+ // JavaScript
187
190
  return filteredWebmentions
188
191
  }
189
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrisburnell/eleventy-cache-webmentions",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Cache webmentions from webmention.io using eleventy-cache-assets.",
5
5
  "main": "eleventy-cache-webmentions.js",
6
6
  "author": "Chris Burnell <me@chrisburnell.com>",
@@ -17,7 +17,6 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@11ty/eleventy-cache-assets": "^2.3.0",
20
- "dotenv": "^10.0.0",
21
20
  "lodash": "^4.17.21",
22
21
  "node-fetch": "2.6.5",
23
22
  "sanitize-html": "^2.5.2"