Post

Avatar
Styles on this are now working! You can pretty much add any Bluesky post's replies as a blog post's comments with one line of code now! www.npmjs.com/package/blue...
N.b., I'm going to go through and replace all the Tailwind styles with simple CSS, I'm pretty sure I messed up injecting them into the shadow dom and there's no obvious way to do it otherwise. Maybe hold off on using that until I can take a better look tomorrow. Source at github.com/aendra-rinin...
GitHub - aendra-rininsland/blue-comments: Attempt to make a simple-to-implement commenting system using ATProtogithub.com Attempt to make a simple-to-implement commenting system using ATProto - aendra-rininsland/blue-comments
Avatar
oh my god thank you !!!
Avatar
Looks AMAZING! Can you clarify or give an example of what to use for both "..."s? To include replies to this post as comments, what would you use from this URL to fill in the "..."s? bsky.app/profile/aend...
Avatar
Avatar
Avatar
rud.is/ex/bsc.html has an example `app.bsky.feed.getPostThread` will be an item in XHR requests from the web app. the URI is quick to find. there are likely easier ways but I live in Developer Tools most days.
Avatar
I believe that if you start at the top of the thread and tap the share thing and select "embed" you'll see it there too
Avatar
yep. it's also there.
Avatar
Oh perfect! Finding it in the embed snippet is MUCH easier than digging through the network tab. Thanks!
Avatar
yes it works! thanks a lot
Avatar
hey would it be possible to accept a uri like 'at://aendra.com/post/3kwbbvjlnw325' or even 'aendra[.]com/post/3kwbbvjlnw325' (on top of the already working 'at://aendra.com/app.bsky.feed.post/3kwbbvjlnw325'); it would make it a bit easier to create the link.
Avatar
I'll add that to the next version, shouldn't be too hard. 👍🏼
Avatar
Here's a bookmarklet I'm using to easily get those URIs gist.github.com/imax9000/944... Create a new bookmark, paste the whole text into URL field, then click that bookmark while on the page you want to get a URI for
Bookmarklet for getting at:// URI from a Bluesky pagegist.github.com Bookmarklet for getting at:// URI from a Bluesky page - paste_into_bookmark_url_field.url
Avatar
It would violate the spec for at:// URIs
Avatar
And potentially lead to ambiguity, when someone creates a collection named `post`
Avatar
If you insist on going down this path, please at least use a different scheme name, e.g. `at+bsky://` or `bsky://`
Avatar
And/or accept `https://bsky.app/...` URLs
Avatar
I'd probably make it so one could paste a Bluesky web URL (i.e., https) instead of having to negotiate the at:// URL, I wouldn't mix formats.
Avatar
Also… is there an equivalent to embed just one post?
Avatar
Might write a separate styleable custom element later, shouldn't be much trouble.
Avatar
this'll do it via bluesky default embed (you likely knew that, but it wasn't clear if you were looking to explicitly use this new webcomponent or not)
Avatar
Sure but it's an external javascript, and it doesn't look as good.
Avatar
Oh shit, the real upside on this is that that means that comment sections are now automatically moderated by BS T&S team. On one hand, thats really good. On the other... more work for the T&S team. Upsides and downsides.
Avatar
Avatar
@r4l.lucidillusions.in need to try this on jekyll website (where i put bsky stories)
Avatar
Hey, this is really cool! I tried adding it to my neocities website (which just uses html and css, doesn't use scripts) and I haven't been able to figure it out. 😅 I put the "script type" thing into the head section, is there someplace in particular I need to put the code from the quickstart?
Avatar
A possibly-simpler approach than the quickstart is to put a script tag to load the module (esm.sh/blue-comment...) in your head, then instantiate it like so where-ever you want it to show up: Note the URI format!
Avatar
Also, you'll need to replace the URI property with whatever Bluesky thread you want to use as a given page's comment section, on every page you want to do that. You probably want to expose a global variable in your template (window.COMMENTS_URI, say) that gets populated by your CMS and passed to b-c
Avatar
Your replies pointed me to the thing I overlooked initially, it works now! Thank you so so much! :')
Avatar
Oh awesome! Glad to hear it! 😊
Avatar
I see there's a thing in the original code from Samuel that tells it to skip replies if they're deleted or blocked, does it eventually remove comments from accounts I've blocked on here? I tested with an alt and it didn't seem to, though admittedly I didn't give it very much time. Still impressive!