Question: when you’re reading a blog, do you prefer it to have a comments section?

Feel free to elaborate by way of reply. 🙂

[ ] Yes
[ ] No
[ ] Don’t care

@kev I tend to use comments off site.
Like the ones on this post: saltmypeanuts.com/bright-eyed-

For me, discussion platforms work better for discussing things, comment blocks I find awkward.

If it was something long and detailed or probing that I wanted to say... I'd perhaps resort to emailing the author. Then a blog of my own.

@rpcutts I like the Mastodon integration. How did you do that?

@kev
Essentially, I post the article to Mastodon, then edit the article to add the Mastodon post ID to the metadata.

Then this JavaScript on the page github.com/rpcutts/saltmypeanu

Calls a 'serverless' function that hits the Mastodon api with that ID and pulls back the tree of replies and puts them at the foot of the article.

@rpcutts thanks! I think this may well implement something like this!

@kev if you'd like I'll dig up the code for the Mastodon api call that gets the replies.

@rpcutts That'd be really useful. I've dug through the JSON a bit but I can't figure out where the replies are in relation to the status ID. @kev

@jamie @kev

so here is the mastodon.js javascript that calls the mastodon api and returns the replies for a given status ID.

pastebin.com/td5kvVwP

(it's a netlify function, hence the exports.handler = function stuff)

@rpcutts Thanks for this. Looks like I’ll have to do some deeper digging with the API than I was doing for photos - but this should get me a long way there. @kev

Follow

@jamie @kev yeah, I just piggybacked on this npmjs.com/package/mastodon
I don't do work that others have already done for me. 😁

Sign in to participate in the conversation
Brain Vomit

Stream of inane drivel.
Some legacy microblogging.
Carrying bags of sand and what have you.