Include code and checkin posts in all post lists

This commit is contained in:
2024-03-10 08:05:07 +11:00
parent 702933c008
commit a35dad35ac

View File

@@ -142,7 +142,7 @@ module Main
def posts_for_timemachine(date:)
posts
.where(post_type: "post")
.where(post_type: ["post", "code", "checkin"])
.where(published_at: TimeMath.day.floor(date)...TimeMath.day.advance(date, +1))
.to_a
end
@@ -156,7 +156,7 @@ module Main
def all_posts
posts
.where(post_type: ["post", "bookmark"])
.where(post_type: ["post", "code", "bookmark"])
.published
.order(Sequel.desc(:published_at))
.to_a
@@ -164,7 +164,7 @@ module Main
def for_rss
posts
.where(post_type: ["post", "bookmark"], location: nil)
.where(post_type: ["post", "code", "bookmark"], location: nil)
.exclude(name: nil)
.published
.combine(:tags)