@chrisburnell/eleventy-cache-webmentions 0.1.6 → 0.1.7
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,6 +3,9 @@ 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
9
|
const TOKEN = process.env.WEBMENTION_IO_TOKEN
|
|
7
10
|
|
|
8
11
|
const absoluteURL = (url, domain) => {
|
|
@@ -91,7 +94,7 @@ module.exports = (eleventyConfig, options = {}) => {
|
|
|
91
94
|
return Promise.reject(response)
|
|
92
95
|
})
|
|
93
96
|
.catch((error) => {
|
|
94
|
-
console.log(
|
|
97
|
+
console.log(`[${hostname(options.domain)}] Something went wrong with your request to webmention.io!`, error)
|
|
95
98
|
})
|
|
96
99
|
}
|
|
97
100
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrisburnell/eleventy-cache-webmentions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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,6 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@11ty/eleventy-cache-assets": "^2.3.0",
|
|
20
|
+
"dotenv": "^10.0.0",
|
|
20
21
|
"lodash": "^4.17.21",
|
|
21
22
|
"node-fetch": "2.6.5",
|
|
22
23
|
"sanitize-html": "^2.5.2"
|