Skip to content

Commit

Permalink
Handle no feed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
waferbaby committed Feb 3, 2024
1 parent 5ed91d7 commit f9aff41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/dimples/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def generate_pages
end

def generate_feed(output_path, posts)
return if layouts['feed'].nil?

layouts['feed'].write(
File.join(output_path, 'feed.atom'),
posts: posts.slice(0, 10)
Expand Down

0 comments on commit f9aff41

Please sign in to comment.