Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add support for comments #6

Closed
1 task done
thombruce opened this issue Aug 13, 2023 · 8 comments
Closed
1 task done

[Feature]: Add support for comments #6

thombruce opened this issue Aug 13, 2023 · 8 comments
Assignees

Comments

@thombruce
Copy link
Owner

Feature request

While I don't necessarily want to use Disqus on my own sites, I do think it's the easiest integration. Consider adding an option to easily have this added.

Something more like what I want personally is... eventually a custom service entirely with support for comments, reactions, voting, maybe even survey responses - features, all of which, that might find their way into a custom CMS?

A halfway measure between these both is something like... I can't remember any specific examples, but there are comments systems that will push comments as new documents to GitHub, so that these remain in-repo. That's slower than an API and it doesn't scale well, but it is nice to have content and comments all in one place and queryable via the same interface.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@thombruce
Copy link
Owner Author

Snipcart have a decent article about adding comments to a static site: https://snipcart.com/blog/jamstack-static-site-comments

They mention Disqus and an option I hadn't previously heard of; Webmentions: https://webmention.io/ Requires a little more setup but it's interesting.

Let's not forget Staticman, which is an old favourite of mine and still a standout contender so far as I'm concerned: https://staticman.net/ - we'd have to host an instance of Staticman ourselves, but with that setup could accept comments via form submissions to the service that are then submitted to a GitHub repo as PRs (that can also be auto-merged).

Self-hosting a service like that is an additional layer of complexity I'd like to avoid for general purposes - it won't suit everybody - but I believe the same instance can be used to manage multiple sites, so I could easily set up one instance for my own projects and client applications.

Shifter list a bunch more options that are similar to Disqus, though many are open source alternatives: https://getshifter.io/static-site-comments/

Another Disqus alternative that's open source and can be self-hosted is Cusdis: https://cusdis.com/

This one is pretty powerful for a free service: https://cactus.chat/demo/ I think the integration with an authentication and redirecting service called Matrix is nifty but probably too involved for what I'm looking for right now...

@thombruce
Copy link
Owner Author

Benefits and drawbacks to each. I like Staticman as a really barebones starter, and I like Disqus for general purposes and ease of implementation (people may want to use it).

I was trying to remember an even simpler alternative: https://utteranc.es/ <- This one just uses GitHub Issues to store references to a post and the comments are the comments on the issue. No self-hosted component, users just need to have a GitHub account...

And finally another alternative that was inspired by Utterances: https://giscus.app/ - Giscus uses GitHub Discussions on a repo instead of the Issues system... which is a lot cleaner. While it is a lot nicer, the visitor still needs to have a GitHub account AND they must authorise a Giscus bot to post on their behalf in GitHub discussions.

Utterances and Giscus are great, but I think more suitable for tech audiences.

@thombruce
Copy link
Owner Author

thombruce commented Aug 14, 2023

Top Contenders

  1. Disqus
  2. Staticman
  3. Cusdis
  4. Webmentions

And webmentions really only features here because I know so little about it.

Disqus takes the crown only for ease of integration and popularity - I certainly want it to be an option, even if I don't end up personally using it myself.

Staticman is in second, because I love that comments and contributions could use the same system AND they would be stored in-repo in the same way. Latency is an issue, and it requires a self-hosted component... but I just adore the seamlessness of it, meaning that when someone pulls the repo... they also pull the comments. The site continues to function in any environment, offline or on. Great for development, though it does mean the repo grows and grows in size. Not highly scalable, but a great starting place.

Cusdis is a little immature as a platform and requires a self-hosted component, but it supports importing comments from Disqus and works similarly (though with a lighter feature set). It is a GREAT open source alternative that is similar to Disqus. Also doesn't require commenters to be signed in, but does require manual moderation. Again, it's a great solution for small sites and a great alternative to Disqus.

Webmentions... is a very cool new standard that works as an alternative to pingbacks. It can receive links, comments, likes from... anywhere on the web. Love it. Love an open standard. But damn, it looks kind of involved and complicated to setup, particularly since I know so little about it. Gets an honourable mention but I think it is far out of scope for this issue - might add it as a future consideration. Edit: I did; see #13.

@thombruce
Copy link
Owner Author

Another another alternative... Mastodon-powered comments: https://cassidyjames.com/blog/fediverse-blog-comments-mastodon/

Stumbled upon this while checking the open issues on Staticman (which is still a favourite, but hasn't seen an update recently).

The setup per post is a bit of a chore:

  1. Write a blog post
  2. Post about it on Mastodon
  3. Grab the resulting post ID and plug it back into the static site
  4. The blog uses the Mastodon API client-side to fetch replies to the given post
  5. Those replies are spit out onto the page and styled

I need to both have a Mastodon account and manage it... although... there is no reason it would need to be Mastodon, right? You could power this system with any compatible fediverse platform. Could you do the same with BlueSky? Threads? What about all of the above?

Doing a little reading... it looks like Threads, BlueSky and Mastodon all use different protocols. Go figure. 🤷‍♂️ The dream of the open web isn't quite here yet.

That's such a shame. If they were interoperable, this approach would be a no-brainer. At this point I'm almost tempted to dust off my plans for my own social network...

And why not? Why not build a service where articles could be stored according to their canonical URL, and comments associated with that listing... as the initial founding step towards a social discussion platform that IS interoperable with others like Mastodon?

Because it's a lot of work.

@thombruce
Copy link
Owner Author

I'm beginning to lean more in the direction of Cusdis. I just really think I want to avoid Disqus on my own sites, due to GDPR and cookie policy considerations... Like... there is so much more work involved in integrating comments than just... integrating comments.

Cusdis is a simpler, more open, less intrusive alternative... so I think it's that or Staticman as a starting point.

@thombruce
Copy link
Owner Author

If we go with Staticman (and even if we go with Cusdis if this isn't supported out-of-the-box), consider the addition of a CAPTCHA to limit spam submissions.

@thombruce
Copy link
Owner Author

Ooh, definitely do consider adding a CAPTCHA!

I was just dropping by to document my decision, made a few days ago: We're going to add Cusdis support for now and call it there. I probably discussed this on the analytics issue when I added support for Umami. We're trying to go for the least invasive options as defaults, requiring fewer headaches about data regulation compliance for downstream users.

@thombruce
Copy link
Owner Author

Basic Cusdis support has now been added: 7bd5a27

I've started talking about a new comment system in a private channel over on my Discord. Cusdis just has a few limitations, and I'd rather a more customisable solution... so I'm planning to build one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant