From fb545d8af85a5ec32d7243187757366520810166 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 2 Dec 2023 11:59:32 +1100 Subject: [PATCH] Wrap microformat posts in items --- slices/micropub/queries/posts/microformat_post.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/slices/micropub/queries/posts/microformat_post.rb b/slices/micropub/queries/posts/microformat_post.rb index 57a33f0..eda2740 100644 --- a/slices/micropub/queries/posts/microformat_post.rb +++ b/slices/micropub/queries/posts/microformat_post.rb @@ -45,7 +45,7 @@ module Micropub end def search_posts(filter:) - post_repo + posts = post_repo .search(term: filter) .map { |post| content = ReverseMarkdown.convert(post.content, unknown_tags: :pass_through, github_flavored: true).to_s @@ -62,6 +62,10 @@ module Micropub } } } + + { + items: posts + } end end end