Filter week posts on homepage

This commit is contained in:
2023-08-07 15:47:12 +10:00
parent e21b3fa2c3
commit b28bdb0427
4 changed files with 51 additions and 1 deletions

View File

@@ -10,8 +10,14 @@ module Adamantium
renderer.call(content: markdown_content)
end
expose :week_posts do
post_repo.week_posts(limit: 10).map do |post|
Decorators::Posts::Decorator.new(post)
end
end
expose :posts do
post_repo.post_listing(limit: 5).map do |post|
post_repo.home_post_listing(limit: 5).map do |post|
Decorators::Posts::Decorator.new(post)
end
end