From 846c98fc2b5cb9e08728ac2d6b47128612731c86 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 e2085142..aa229829 100644 --- a/lib/jekyll-feed/generator.rb +++ b/lib/jekyll-feed/generator.rb @@ -67,7 +67,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