mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 02:43:24 +03:00
doc: Fixup RSS generation without items
Well, don't generate! This fixes local generation as ``` nix-build doc/ ```
This commit is contained in:
parent
fa0a2a5734
commit
f480573cf7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user