Decentralised Nostr news feed

šŸ‘‰ Nostr

šŸ”„ Nostr – Last 5 Trending Posts

šŸ”Œ Connecting…
Loading…

If you are interested, this is the code for embedding the feed

What the code does

  1. Loads the nostr-tools library from a public CDN (jsdelivr.net).
  2. Defines a list of public Nostr relays (trending.relays.land, relay.nostr.info, relay.damus.io, relay.snort.social).
  3. Creates a simple UI (HTML + CSS) that will display the last 5‑10 trending Nostr notes.
  4. Fetches those notes from the relays, deduplicates them, and renders them.
  5. Looks up each author’s profile (kind 0 event) to get a display name and avatar, caching the result in a Map.
  6. Provides ā€œReplyā€ buttons that open the note on yakihonne.com.

Leave a Reply

Your email address will not be published. Required fields are marked *