Link previews! #467

Closed
ghobs91 wants to merge 0 commits from main into main
ghobs91 commented 2023-03-28 10:16:12 +00:00 (Migrated from github.com)

This adds link previews to notes containing a url, and uses Dufflepud to do so.

image
This adds link previews to notes containing a url, and uses [Dufflepud](https://github.com/staab/dufflepud) to do so. <img width="822" alt="image" src="https://user-images.githubusercontent.com/4033636/228205850-2a612d2a-e93e-4b50-a02f-87dfc5e934da.png">
v0l commented 2023-03-29 17:53:16 +00:00 (Migrated from github.com)

Dufflepud has more stuff which is specific to Coracle, I made a somewhat similar endpoint on the Snort API:

https://api.snort.social/api/v1/preview?url=https%3A%2F%2Fgithub.com%2Fv0l%2Fsnort

https://api.snort.social/swagger/index.html

{
  "og_tags": [
    [
      "og:image",
      "https://opengraph.githubassets.com/7d1ad9d0b706aab37b17beead1261eac67e3729adcf5cc8a3e6da4fc8a9f2fb3/v0l/snort"
    ],
    [
      "og:image:alt",
      "Nostr UI. Contribute to v0l/snort development by creating an account on GitHub."
    ],
    [
      "og:image:width",
      "1200"
    ],
    [
      "og:image:height",
      "600"
    ],
    [
      "og:site_name",
      "GitHub"
    ],
    [
      "og:type",
      "object"
    ],
    [
      "og:title",
      "GitHub - v0l/snort: Nostr UI"
    ],
    [
      "og:url",
      "https://github.com/v0l/snort"
    ],
    [
      "og:description",
      "Nostr UI. Contribute to v0l/snort development by creating an account on GitHub."
    ]
  ],
  "title": "GitHub - v0l/snort: Nostr UI",
  "description": "Nostr UI. Contribute to v0l/snort development by creating an account on GitHub.",
  "image": "https://opengraph.githubassets.com/7d1ad9d0b706aab37b17beead1261eac67e3729adcf5cc8a3e6da4fc8a9f2fb3/v0l/snort"
}
Dufflepud has more stuff which is specific to Coracle, I made a somewhat similar endpoint on the Snort API: https://api.snort.social/api/v1/preview?url=https%3A%2F%2Fgithub.com%2Fv0l%2Fsnort https://api.snort.social/swagger/index.html ```json { "og_tags": [ [ "og:image", "https://opengraph.githubassets.com/7d1ad9d0b706aab37b17beead1261eac67e3729adcf5cc8a3e6da4fc8a9f2fb3/v0l/snort" ], [ "og:image:alt", "Nostr UI. Contribute to v0l/snort development by creating an account on GitHub." ], [ "og:image:width", "1200" ], [ "og:image:height", "600" ], [ "og:site_name", "GitHub" ], [ "og:type", "object" ], [ "og:title", "GitHub - v0l/snort: Nostr UI" ], [ "og:url", "https://github.com/v0l/snort" ], [ "og:description", "Nostr UI. Contribute to v0l/snort development by creating an account on GitHub." ] ], "title": "GitHub - v0l/snort: Nostr UI", "description": "Nostr UI. Contribute to v0l/snort development by creating an account on GitHub.", "image": "https://opengraph.githubassets.com/7d1ad9d0b706aab37b17beead1261eac67e3729adcf5cc8a3e6da4fc8a9f2fb3/v0l/snort" } ```
v0l commented 2023-03-30 11:37:50 +00:00 (Migrated from github.com)

@ghobs91 Can you use the new API i built?

@ghobs91 Can you use the new API i built?
v0l (Migrated from github.com) requested changes 2023-04-03 09:28:34 +00:00
v0l (Migrated from github.com) left a comment

Please use the new API that i listed

Please use the new API that i listed
v0l commented 2023-04-04 12:55:54 +00:00 (Migrated from github.com)

Thanks

Thanks
Some checks reported errors
continuous-integration/drone/push Build encountered an error

Pull request closed

Sign in to join this conversation.
No description provided.