Static Comments System for Jekyll [closed]
Asked Answered
G

2

13

My blog currently runs Jekyll and the Minimal Mistakes theme, and uses the theme's built in functionality to add the Disqus comments system.

This JavaScript-based commenting system, to me sort of defeats the purpose of having a static blog in Jekyll, considering:

  1. Its JavaScript creates a decisively non-static page.
  2. Comments are not stored with the website.
  3. Comments are stored in some database instead of flat-text files.

My question is, therefore: What is a suitable system for comments that stays as close to the Jekyll philosophy as possible (an ideally runs on gh-pages)?

I found several possible candidates:

  1. Isso is a comments system which is looks similar to Disqus, it works with a SQLite database
  2. Jekyll::StaticComments seems pretty suitable, but it means you have to manually add the comments from emails.

Are there any other options? If so, what would work with gh-pages, and what would work on a self-hosted Jekyll blog?

Goosefoot answered 16/11, 2015 at 9:2 Comment(0)
S
16

Here's another solution which is dynamic and uses JavaScript, but doesn't store the comments at a 3rd party provider:

This guy made a static website with Jekyll, but uses GitHub's issue tracker to create his comments.
He uses GitHub Pages to host his blog, and for each new post, he creates a new issue in his blog's repository.
Then, he uses JavaScript to get the issue's comments from the GitHub API and show it on the page.

Here's a blog post which explains how to set this up:
GitHub hosted comments for GitHub hosted blogs

Sumbawa answered 16/11, 2015 at 22:12 Comment(1)
Thanks, that is really interesting. I really like, the Jekyll::StaticComments idea that comments are stored in _comments, but obviously this is only possible with a git commit. Perhaps it would be possible to have a hybrid form, which displays the comments from the issue tracker, until the owner moves them to _comments (also displayed), ideally in a somewhat automated way.Goosefoot
T
7

Whether a javascript loaded, externally hosted comment system "defeats the purpose" of a static site is a matter of opinion.

For me, the point is to be able to host the site as entirely static resources, to take advantage of caching, CDN, distributed hosting, etc. I have seen huge advantages to that, and externally hosting my comments doesn't conflict at all.

That being said, it's an interesting question.

Isso (like Disqus) uses JS on the client side and requires server side software (Python based) that you have to manage, so it doesn't seem like this is any closer to your ideal.

Jekyll::StaticComments is in the right direction, but it's not supported on gh-pages if you have GitHub processing your Jekyll site (you can of course generate the static site yourself and then host it on GitHub Pages).

You also need a way for users to submit comments, and then to get those comments into a file that can be used by the generation process (not necessarily via email as you thought though).

So you need to take comments from somewhere, possibly email, possibly yet another third party hosted app (SimpleForm maybe).

And then you need to manually put them into the YAML site, regenerate, then publish, or, you can set up an automated build process for your site, which can pull the user submitted content when available and build and publish automatically.

Other than manually accepting comments through an off-site medium, you're going to deal with something dynamic somewhere.

Tonitonia answered 16/11, 2015 at 15:27 Comment(1)
Thanks a lot, seeing as I don't get an awful lot of comments, I might just go with the manually adding.Goosefoot

© 2022 - 2024 — McMap. All rights reserved.