Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/czue/bluesky-comments

Add a comments thread to any page using bluesky.
https://github.com/czue/bluesky-comments

Last synced: about 1 month ago
JSON representation

Add a comments thread to any page using bluesky.

Awesome Lists containing this project

README

        

# Bluesky Comments

Embed Bluesky comments on your website easily.

**[Write up and demo here](https://coryzue.com/writing/bluesky-comments).**

## Installing on a website from a CDN:

1. Add the default styles the page `` somewhere in a base template:

```html

```

2. Add the comments (and React dependencies) to the end of the body on any page that you wnat to show comments on:

```html

```

3. Initialize the comments by passing in a link to the post you want to use as a base:

```html

document.addEventListener('DOMContentLoaded', function() {
const uri = 'https://bsky.social/coryzue.com/posts/3jxgux';
if (uri) {
initBlueskyComments('bluesky-comments', uri);
}
});

```

## Installation with npm

```bash
npm install bluesky-comments
```

I don't publish a lot of JavaScript packages, but I think you can import it by doing this!

## Development

To develop on this package, you can run:

```
npm install
npm run watch
```

This will watch for changes and copy the built files to the `dist` directory.
From there you can reference the files in your own project and any updates you make
should show up instantly.