From 7d210c57d78317191a5e0db284bf1766f8480ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Fe=CC=81vrier?= Date: Mon, 12 Apr 2021 16:47:20 +0200 Subject: [PATCH] Add support for posts collection disabling --- lib/jekyll-feed/generator.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/jekyll-feed/generator.rb b/lib/jekyll-feed/generator.rb index f017685c..02b81450 100644 --- a/lib/jekyll-feed/generator.rb +++ b/lib/jekyll-feed/generator.rb @@ -62,7 +62,10 @@ def collections {} end - @collections = normalize_posts_meta(@collections) + if config["posts"] != false + @collections = normalize_posts_meta(@collections) + end + @collections.each_value do |meta| meta["categories"] = (meta["categories"] || []).to_set end