Skip to content

Commit

Permalink
looks like dotenv is necessary here?
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburnell committed Dec 9, 2021
1 parent 098c546 commit 7d40f1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion eleventy-cache-webmentions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ const sanitizeHTML = require("sanitize-html")
const uniqBy = require("lodash/uniqBy")
const { AssetCache } = require("@11ty/eleventy-cache-assets")

// Load .env variables with dotenv
require("dotenv").config()

const TOKEN = process.env.WEBMENTION_IO_TOKEN

const absoluteURL = (url, domain) => {
Expand Down Expand Up @@ -91,7 +94,7 @@ module.exports = (eleventyConfig, options = {}) => {
return Promise.reject(response)
})
.catch((error) => {
console.log("[${hostname(options.domain)}] Something went wrong with your request to webmention.io!", error)
console.log(`[${hostname(options.domain)}] Something went wrong with your request to webmention.io!`, error)
})
}

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chrisburnell/eleventy-cache-webmentions",
"version": "0.1.6",
"version": "0.1.7",
"description": "Cache webmentions from webmention.io using eleventy-cache-assets.",
"main": "eleventy-cache-webmentions.js",
"author": "Chris Burnell <me@chrisburnell.com>",
Expand All @@ -17,6 +17,7 @@
},
"dependencies": {
"@11ty/eleventy-cache-assets": "^2.3.0",
"dotenv": "^10.0.0",
"lodash": "^4.17.21",
"node-fetch": "2.6.5",
"sanitize-html": "^2.5.2"
Expand Down

0 comments on commit 7d40f1b

Please sign in to comment.