I wanted to experiment with showing replies on my microblog but hidden under a <details> block, and only if there were replies to a post. Otherwise, I’d prefer the Details not to show at all. I thought putting the block within the {{ if .Site.Params.include_conversation }} conditional would do that, but it still shows on every post, even those without replies.
I don’t think there’s a .Page variable with the replies count available, unfortunately. You could call the JSON API or Conversation.js from Hugo to figure it out, but that’s a bad idea™. It would result in long build times for your blog and stress the network unnecessarily. Also, if someone comments on a post after the blog has been built, the conversation won’t show until the next build.
As fetching the conversation already happens client side, I would do the <details> dance with JavaScript as well.