Code Monkey home page Code Monkey logo

bsky.link's Introduction

Bluesky Link Preview

Generate permalinks to Bluesky posts that you can embed in a website.

Posts are not cached. This means that if a post becomes unavailable or private, the link will no longer work.

Text posts, posts with embedded posts, and posts that contain one or more images are supported by this project.

This project is not affiliated with Bluesky.

Screenshot

Screenshot of a Bluesky post written by jamesg.blog

How to Embed

To create an embedded link, go to https://bsky.link and enter the URL of the Bluesky post you want to embed. The application will generate an iframe that you can embed in your site.

You can also reference a link directly in your own iframe using this syntax:

<iframe src="https://bsky.link/?url=<post_url>"></iframe>

Application Routes

  • /: Interactive web application through which you can generate embed codes.
  • /?url=: Endpoint with a post that you can embed into a website.

How to Run

To run the application, first install the required dependencies:

npm install

Then, create config.js and add your Bluesky credentials (handle and password) and domain name for the Bluesky Link application, like this:

const config = {
    "HANDLE":"yourname.bsky.social",
    "PASSWORD":"xxxx-xxxx-xxxx-xxxx",
    "DOMAIN":"bsky.domain.example"
}
module.exports = config;

Finally, run the following command to start the application server:

npm start

License

This project is licensed under an MIT 0 License.

Contributors

  • capjamesg
  • kevinmarks

bsky.link's People

Contributors

capjamesg avatar dependabot[bot] avatar kevinmarks avatar saphirelattice avatar zegnat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bsky.link's Issues

Redirect to Bluesky-proper if opened in a browser

Just throwing out an idea here. Might not be what bsky.link wants to do at all.

jort.link has an interesting system where it serves a version of a link hosted by them only when requested by fediverse platforms, otherwise it returns a redirect to the actual link.

bsky.link could do something similar when people are using it to get embeds on Discord, Slack, etc: when a link is requested by a link preview agent, return HTML with <meta> elements for preview generation, but if requested by a web browser redirect the user to Bluesky-proper.

Another prior art for a service like this is https://mstdn.link/ (source). This one did no fancy user-agent detecting, instead putting a little bit of JS on the served page that handles a redirect.

Website not working

when I visit bsky.link I get this:

Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

Discord embedded photos are very small

Hello, and thanks for the project!

I'm on a Discord that's using bsky.link to share with the uninvited masses, and the embeds look like this:

A bsky.link to a post by Low Quality Facts. The thumbnail is to the right of the post text and is very small

A bsky.link to a post by Amy with no text. The thumbnail is to the right of the title and also very small

For comparison, here's a psky embed with the desired behavior:

A psky.app link where the name, text, and image are on three separate paragraphs

I don't know anything about how embeds work, but I might come back with a pull request if I find the time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.