doc: Fixup RSS generation without items
Well, don't generate!
This fixes local generation as
```
nix-build doc/
```
@@ -35,7 +35,7 @@ module Processor
end
def generate()
- puts "[S] Generating sitemap..."
+ puts "[S] Generating RSS feed..."
entries = Article.get_article_paths().map do |filename|
entry = Article.new(filename)
{
@@ -46,6 +46,8 @@ module Processor
}
end
+ return unless entries.length > 0
+
File.open(File.join($options["output_dir"], "index.xml"), "w") do |file|
file.write(to_rss(entries))
end
