How to include latest comments on homepage

I’d like to have the 5 (or x) latest comments on the homepage. Something like the “Highligthed” section in the Source theme, but latest comments instead of starred posts. :slight_smile:
Is there any theme that supports this, so i can get “inspiration” how to do it? Wasn’t able to find information about this.

Short answer: no theme can do this with Handlebars alone, so you won’t find one to copy from. The {{comments}} helper just loads the comments app, {{#get}} can’t filter or sort posts by comments, and there’s no public endpoint for “latest comments across the site”. Someone tried a year ago and hit the same wall (thread: Is it possible displaying multiple posts’ comments in 1 page?).

What does work, in order of effort:

Easiest: show “posts with recent discussion” instead of the comments themselves. Loop over your latest 20 or so posts with {{#get}}, output data-ghost-comment-count on each, and a few lines of JS to hide the ones with zero and sort by count. Not truly “latest”, but honest and zero backend.

Middle: a comment.added webhook to Make, n8n or Zapier that writes the last 5 comments as JSON somewhere your theme can fetch it from (a small JSON file on Cloudflare or similar). Theme fetches it on the homepage and renders. That’s the real “latest 5 comments” and it’s an hour of work, no coding beyond a fetch and a loop.

Hardest: call the same members API the comments app uses, per post, from the homepage. Works, but that’s one request per post and you’re relying on undocumented endpoints.