@carl Testing testing.

An improved enhancement would be to have an embeddable comment text box within the blog post itself!

@subins2000 This is a lot more complex since the text box will depend on your server and you will need to log into your account.

@carl
you can do this without javascript by loading in data folder and using it in publication.
If you rebuild you website once a day, it does the work.
@subins2000

@fluffy @subins2000 @jibec Basically the idea from Jean-Baptiste is to use Hugo capability to load a json to render the comments statically. It's a nice idea but then you need to setup a corn job building the website hourly or daily.

@carl @subins2000 @jibec thanks, i have been meaning to set something like this up and it will be helpful!

@fluffy
here is the code, look at the python script.
github.com/languages-in-floss/
what deacribed carl is correct.
My implementation is quite minimalist (as a non dev, it took me quite some time to understand it from a javascript implementation)
yes, i have a daily script running. Making it faster isn't really needed for my usecase, anyway, the build script takes a few second, no big deal
@subins2000 @carl

@jibec @carl @subins2000 this is so damn neat I am now tempted to add comments to a static site I am building. Thank you for this!

@carl This is nice. I use webmentions on my site, and brid.gy/ can transform toots into webmentions. If you're not into webmentions, this is a pretty neat trick.

@binyamin Thanks and using webmentions is also nice :)

@binyamin @carl same. Using Webmentions as well. 3rd party or own endpoint are up to the website - and this is NICE.

…and brid.gy is **awesome** :D

@carl I am longing for this. Thank you very much, Carl. And glad to see you once again.

(I am a KDE user)

@xosem It should not be much different, also you could play with the reply variable, it contains much more information that could be displayed.

@carl Sounds great. I'll give it a try on my blog. (from Pleroma, that should work fine?)

@carl
Nice solution. Beats mine where I just link the post (my no-JavaScript policy).

@torresjrjr It should be also possible to render the comments at build time but then I would have to add a cron job to rebuild my website every hour :)

@carl not really a solution since you rely on 3rd-party services to show comments. when your site and mastodon instance disappear in the future, the information is lost, not includes in archives

i have a concept for a solution to have static comments for static websites

pad.nixnet.services/U0RU2OpgTb

#indieweb #website #selfhosting

@davidak if I'm understanding this correctly this is essentially how Staticman does comments: github.com/eduardoboucas/stati

@carl I like your fediverse implementation, great work. It should cut down on anonymous spam. I think a Reply/Add comment button (not a text field) next to the Load button would be nice and it can link to: linuxrocks.online/interact/105
Thoughts?

@shom @davidak Good idea about the interactive link. I added it to my blog :)

@carl replied with the reply button workflow, it works. Nice!
@davidak

@carl
Very nice use of mastodon.
Would it be possible to get it to open in #fedilab (or other client)

@carl Nice 😀 So what's your workflow - you publish the post first, then the toot, then edit the published post to include the frontmatter with the toot id?

@apetresc yes :) I just need to be quick so that nobody notice :)

@carl I'm with @davidak on the 3rd-party thoughts. Why not barkdull.org/software/hashover ? It seems greatly underrated and can be self hosted using flat-files for data storage.

@mikael @carl as i understand it it's still a 3rd-party service where the comments are loaded from, that you host yourself

and unlike isso or commento it's written in PHP, which is known for having massive security issues (look at number of CVEs). you use a static page because you don't want PHP on the server! else you could just use Wordpress which has comments

posativ.org/isso/
commento.io/

all this is not really a solution

@davidak @carl I wouldn't go as far as calling it a 3rd party service? It's software which is part of the blog stack and running on the same server. PHP is dead simple and works anywhere™️. I love it. Security-wise it's probably fine, we're not exactly talking about banking.

@davidak @carl

Commento seems to require a full fledged PostgreSQL installation. Regarding Isso I think the documentation puts it well: "If you think hosting a web application written in Python is as easy as one written in PHP, you are wrong."

PHP and flat file data storage ftw.

@mikael @davidak PHP is not the problem, I use PHP in a lot of websites and when using modern best practice, the language is fine :) The goal when using a static site generator is usually to have a website that is fast and easy to maintain. No database to configure, easy backup, easy apache config, ...

@carl @davidak I'm basically with you, but flat file data storage + PHP pretty much gives you that: no db to configure, easy backup.

Something like commentpara.de/ might be a good alternative to your 3rd Mastodon solution too?

@mikael @carl why not use wordpress then? it's very user friendly and has a huge ecosystem

a perfect comment solution would serve the comments in the same http request as the content. then it can be archived. wordpress does it serverside, so it's given there. it's not with comment services that load the comments with JS

and because i try to have a perfect solution, i don't have comments for some years now and don't write blog post i want to get feedback on. so power to your pragmatic solutions

@davidak @carl WordPress is nice in theory, but I've had enough problems with migrating WP databases. Hugo is so nice to work with.

@davidak @carl

> a perfect comment solution would serve the comments in the same http request as the content.

Yeah, that would be very nice! Sometimes the perfect solution doesn't exist. Sacrificing comments is an unlucky outcome. Hashover or one of those third party Webmention services seems OK. Even better would be being able to self host a webmention service. Something like this: github.com/mapkyca/pingback2ho (but more up to date). Does it exist?

@mikael @carl there exist many small projects, but nothing outstanding. most incomplete or abandoned

i collected some links here: codeberg.org/davidak/webseite/

@davidak @carl Rad collection! More specifically I was referring to a self hosted webmention service so that you don't have to rely on something like commentpara.de/ or webmention.io/

@mikael @davidak @carl I already have a mailing list for my website (link in profile) that’s linked at the bottom of every post, but I’m thinking about setting up webmentiond by @zerok to forward Webmentions to the list.

Mailing lists allow anyone to participate without setting up an account, and email isn’t web-based; the latter is quite attractive to members of the Gemini and Gopher spaces.

@carl Oh. This is interesting. I might add this to my blog, which I always intended to have Mastodon comments, but I hadn't figured out yet how to do it.

@carl Very cool, I might have to add this to my site. Enjoy being on HN!

@carl Is there a way to have it load comments automatically for example once someone scrolls to the comment section

@fluffy @carl you could pair the comment loader with an IntersectionObserver

@fluffy @carl so basically, attach an observer to the target element, then load comments in the observer callback.

@carl I can see on your Mastodon feed that there are replies, but I can't see them on the blog post itself. Is that intentional?

Sign in to participate in the conversation
LinuxRocks.Online

Linux Geeks doing what Linux Geeks do..