Nostr WoT
AnnouncementWidgetsNostrEmbeddableSEO

Introducing Nostr Widgets

We launched Nostr Widgets: a tiny set of embeddable, server-rendered SVG components for any website. One <a><img></a> snippet drops a profile card, a follow button, or a live feed into your blog, README, or landing page — and the link points back to nostr-wot.com.

Leon Acosta

Leon Acosta

·4 min read
Introducing Nostr Widgets

You write a blog post. You want to point readers at your Nostr profile. Today, you have two options: paste a long npub and trust people to figure it out, or drop in a JavaScript SDK that runs an entire Nostr client just to render an avatar.

Neither is great. So we built Nostr Widgets.

What it is

A widget is a server-rendered SVG. You embed it with one line of HTML:

html
<a href="https://nostr-wot.com/p/npub1gxdhmu9..." target="_blank" rel="noopener">
  <img
    src="https://nostr-wot.com/widgets/profile/npub1gxdhmu9..."
    alt="Leon Acosta on Nostr"
    width="320"
    height="220"
  />
</a>

That's it. No <script> tag, no iframe, no JavaScript framework. The image is a static SVG generated on our server from live Nostr data, cached aggressively, and served with proper Cache-Control and ETag headers. It works in static-site generators, Notion, Substack, GitHub READMEs, and any markdown-flavored editor that lets you embed an image.

Three kinds, one snippet each

Every widget is a real <img> of a real SVG. That means it's accessible, indexable, and degrades gracefully — if the widget service is ever offline, the surrounding <a> still works.

1. Profile badge

A self-contained card with the user's avatar, name, NIP-05, bio, and a "Follow on Nostr" call-to-action. 320×220, fixed dimensions, no layout shift. Use it in author bios, sidebars, or "find me on Nostr" sections.

2. Follow button

A pill-shaped button that links straight to the user's profile on nostr-wot.com. 220×44. Drop it next to your other social buttons (Twitter, LinkedIn, GitHub).

3. Feed strip

The author's last 1–5 short notes, rendered as a vertical list. Each note shows the avatar, name, timestamp, and the first line of content. 320×variable height. Embed it where you'd put a "latest tweets" widget — except this one is decentralized and the link backs to a Nostr profile, not a corporate platform.

Why this matters for SEO

If you embed a widget, the surrounding <a> points at nostr-wot.com. To search-engine crawlers, that's an inbound link from your domain to ours. As more sites adopt Nostr Widgets, the link graph that powers Web of Trust on Nostr also accrues link authority on the open web — which makes Nostr profiles easier to discover via Google, not just inside Nostr clients.

This isn't an accident. The whole point of widgets is that they're link-friendly: real anchor tags pointing at real URLs, not iframes that hide the destination from crawlers.

What's NOT in there (on purpose)

Widgets are static SVG. There's no tracking pixel, no JavaScript fingerprinting, no impressions counter. We don't know who embedded what or how often it's viewed — and we like it that way.

  • No iframes. Iframes don't pass link authority to crawlers, and they introduce a same-origin risk we don't want to take.
  • No JavaScript on the embed side. Adding a third-party <script> to your page is a security and performance hazard. SVG is an <img>. It can't read your cookies, can't run code, can't do anything except draw pixels.
  • No theming params on day one. One polished default per widget kind. We may add ?theme=light|dark later if there's demand.

How it works under the hood

The widgets service is a small Node process behind nginx on the same VPS that serves nostr-wot.com. When a crawler or browser requests /widgets/profile/<npub>:

  1. We resolve the npub to a hex pubkey.
  2. We pull the user's latest kind 0 (profile) and kind 3 (follow list) from a SimplePool of Nostr relays.
  3. We render an SVG string with the data baked in — text, geometry, embedded avatar (96×96 base64 PNG resized via sharp).
  4. We send it back with Cache-Control: public, max-age=300, stale-while-revalidate=86400 and an ETag.

A small in-memory LRU absorbs duplicate requests. The relay pool is shared across widgets, so the second request for the same profile is essentially free.

Open source

The renderer (@nostr-widgets/renderer) and the server (apps/server) are both MIT-licensed and live in the nostr-widgets repository. You can self-host the service if you'd rather not depend on nostr-wot.com, or contribute a new widget kind (zap badge? Lightning address card? feed of notes matching a tag?) via PR.

Get started

Pick your npub, pick a widget, paste the snippet:

  • Profile badgehttps://nostr-wot.com/widgets/profile/<npub>
  • Follow buttonhttps://nostr-wot.com/widgets/follow/<npub>
  • Feed striphttps://nostr-wot.com/widgets/feed/<npub>?limit=3

Visit the widgets gallery for live previews and copy-paste-ready snippets.


Have feedback? Reply on Nostr or open an issue on GitHub.

Leon Acosta

Written by

Leon Acosta

View on Nostr →

Stay Updated

Get the latest on new features, trust assertions, and services integration as they ship.

No spam, ever. Unsubscribe anytime.