It felt lonely in here, so I got Isso
working for comments. Easy to nuke-and-pave if I don’t like it, at
least. The whole “Python virtualenv” experience was a real pain in the
ass, though, since
pip install repeatedly claimed to have installed
all the dependencies, while
pip list called bullshit on that.
I’ll probably have to put Monit on the server in case it crashes, but that can wait.
It’s possible to have Isso dynamically update the comment count in the article metadata block, but I just spent about an hour failing to get it to work, between Isso’s and Hugo’s overlapping limitations.
Until I ran into Hugo’s variable-scoping. When you render content in a
list context, you’re really fully rendering each page in its own
context and then including the results. So, inside a template,
$.URL refer to the individual article’s
context, as if you were currently writing out that one article to
disk. And of the two completely different ways you can set variables,
one of them is strictly block-scoped, and the other is strictly
page-scoped. You can’t pass either down into a partial template.
(there’s a partial-with-arguments called a shortcode, but that’s a completely different beast, and I’m not sure it is either effective or efficient to replace all your partials with shortcodes) UPDATE: completely impossible, in fact; shortcodes don’t work in template files, and partial templates don’t work in content files. They’re completely different things with completely different behaviors. You have to construct a custom dictionary and pass it into a partial template, which is butt-ugly and error-prone.
So, yeah, no comment-count on the home page at the moment.
I wrote my own bitty Jquery function to use Isso’s API directly and insert the comment count on page-load. It would be nice if the API returned “0” instead of 404 errors when there aren’t any comments, though.
Markdown formatting and simple HTML accepted.
Sometimes you have to double-click to enter text in the form (interaction between Isso and Bootstrap?). Tab is more reliable.