From 0987d6ccec727a69e4772dd68f7bff9b31ce6017 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 18 Oct 2021 15:21:46 +0100 Subject: [PATCH 1/5] Add magic string exclusion support --- src/index.11tydata.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.11tydata.js b/src/index.11tydata.js index 1ee62ab..35623ed 100644 --- a/src/index.11tydata.js +++ b/src/index.11tydata.js @@ -84,6 +84,11 @@ async function do_feeds() { global.feed_items.sort((a, b) => b.pubdate_obj - a.pubdate_obj); // console.log(feed_items.map(el => el.title)); + const magic_string = `__excludehullblogs__`; + global.feed_items = global.feed_items.filter((item) => item.title.indexOf(magic_string) === -1 + && item.description.indexOf(magic_string) === -1 + && item.content.indexOf(magic_string) === -1) + if(process.env.FILTER_FEED) { const feed_items_count = global.feed_items.length; global.feed_items = global.feed_items.filter((item) => !check_text(item.title) From debd9839f3c38264243003dd59c7f7c6fa7a9c4c Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 18 Oct 2021 15:25:31 +0100 Subject: [PATCH 2/5] README: Document magic string --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 943bae7..a7c39e3 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Editing `feeds.json` is easy. You can even do it right in your web browser: