Show bookmarks on post page

This commit is contained in:
2024-07-10 18:57:59 +10:00
parent 98e289744a
commit 87d8e5a1fa
5 changed files with 25 additions and 13 deletions

View File

@@ -154,6 +154,13 @@ module Main
.to_a
end
def bookmarks_for_week(date:)
posts
.where(post_type: "bookmark")
.where(published_at: TimeMath.day.advance(date, -7)...TimeMath.day.floor(date))
.to_a
end
def all_posts
posts
.where(post_type: ["post", "code", "bookmark"])