Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ptdewey/bluesky-comments-svelte
Embed Bluesky replies as comments on any webpage!
https://github.com/ptdewey/bluesky-comments-svelte
atproto bluesky svelte
Last synced: about 22 hours ago
JSON representation
Embed Bluesky replies as comments on any webpage!
- Host: GitHub
- URL: https://github.com/ptdewey/bluesky-comments-svelte
- Owner: ptdewey
- License: mit
- Created: 2024-11-26T03:33:48.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-27T21:06:18.000Z (2 months ago)
- Last Synced: 2025-01-22T15:45:29.878Z (5 days ago)
- Topics: atproto, bluesky, svelte
- Language: Svelte
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bluesky Comments (svelte)
`bluesky-comments-svelte` is a Svelte-based component for embedding Bluesky comment sections seamlessly into your Svelte applications.
This package is inspired by and based on the functionality provided by the [Bluesky Comments project](https://github.com/czue/bluesky-comments) created by Cory Zue. It adapts the original idea to work natively within the Svelte ecosystem for better developer experience and integration.
## Features
- Native Svelte component for embedding Bluesky comment sections.
- Simple, declarative syntax for easy integration.
- Lightweight and dependency-friendly.## Installation
Install the package using npm:
```bash
npm install bluesky-comments-svelte
```## Usage
Attaching comments of specific post by link:
```svelte
import { CommentSection } from "bluesky-comments-svelte";
// Provide the URI of the Bluesky post you want to display comments for
const uri = "https://bsky.app/profile/emilyliu.me/post/3lbq7dp6k6k2x";```
Automatically attach comments to the most recent post that links to page:
```svelte
import { CommentSection } from "bluesky-comments-svelte";
const author = "pdewey.com";
```
#### Props
The `CommentSection` component accepts the following props:
- `uri` (string)
The URI of the Bluesky post for which comments should be displayed.
- `author` (string)
The Bluesky post author username for which posts should be checked for matching URLs
- `opts` (object) -- Optional
A JSON object of options that can be passed into the component
Currently contains: `showCommentsTitle` (Boolean -- default true) that tells the component whether or not to render the "Comments" header.One and only one should be specified for any given CommentSection component.
## Development
If you'd like to contribute or modify this package:
1. Clone the repository:
```bash
git clone https://github.com/ptdewey/bluesky-comments-svelte.git
```
2. Install dependencies:
```bash
npm install
```
3. Run the development server:
```bash
npm run dev
```## License
This project is licensed under the [MIT License](./LICENSE).
## Support
For questions or support, open an issue on the [GitHub repository](https://github.com/ptdewey/bluesky-comments-svelte/issues). Feedback and contributions are highly appreciated!