You can use Mastodon to add comments to your static blog engine.
@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.
here is the code, look at the python script.
what deacribed carl is correct.
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
@carl What a great idea! Thanks for sharing
@binyamin Thanks and using webmentions is also nice :)
@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 This is really awesome, you did a very nice job !
@vincentxavier Merci :)
@en Probably the API is almost the same.
@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
@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: https://linuxrocks.online/interact/105463655803971969?type=reply
@carl Not very user-friendly but it works !
@carl Very nice. I think I can use this in my WordPress.
@carl Wow fancy!
@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 thats pretty cool
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
all this is not really a solution
@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, ...
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
> 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: https://github.com/mapkyca/pingback2hook (but more up to date). Does it exist?
i collected some links here: https://codeberg.org/davidak/webseite/issues/7#issuecomment-63328
@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 darn, I've had this idea on my list for a while now!
@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 This should be easy using the Intersection Observer API: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
@carl great idea !
@carl nice, this is a neat concept.
@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?
Linux Geeks doing what Linux Geeks do..