From 926a2c2084a5fea94beba57ec3c9aff01da9b702 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 20 Aug 2021 20:12:53 +0100 Subject: [PATCH] Revert "Fix debug output from DEBUG_FEEDITEMS env var" This reverts commit 0ed5d4de894b7e7f0b3a12c190a7595e220aaa34. --- README.md | 2 +- src/index.11tydata.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7866c70..9a42f1c 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ The following environment variables can be used to influence the behaviour of th Environment Variable | Purpose ------------------------|------------------------------ -`FILTER_FEED` | Set to `true` to enable the filtering of posts based on whether they contain any bad words. Uses [futility](https://www.npmjs.com/package/futility), but with a custom algorithm on top to avoid the "[Scunthorpe Problem](https://en.wikipedia.org/wiki/Scunthorpe_problem)". +`FILTER_FEED` | Set to any value to enable the filtering of posts based on whether they contain any bad words. Uses [futility](https://www.npmjs.com/package/futility), but with a custom algorithm on top to avoid the "[Scunthorpe Problem](https://en.wikipedia.org/wiki/Scunthorpe_problem)". Example of setting an environment variable when running a build: diff --git a/src/index.11tydata.js b/src/index.11tydata.js index 18d211c..0f455da 100644 --- a/src/index.11tydata.js +++ b/src/index.11tydata.js @@ -66,8 +66,7 @@ module.exports = async function() { item.media_image_notfound = item.media_image == `./images/post.svg`; console.log(`MEDIA IMAGE`, item.media_image); - if(typeof process.env["DEBUG_FEEDITEMS"] != "undefined" - && process.env["DEBUG_FEEDITEMS"] === "true") + if(typeof process.env["DEBUG_FEEDITEMS"] != "undefined") console.log(`FEED ITEM`, item); return item;