nostr-post wiki

NIP-54 collaborative entity pages — kind:30818

💡 How it works

  1. Many pubkeys can each publish a kind:30818 event for the same d-tag (entity slug).
  2. Clients resolve the canonical version (newest wins, defer markers honoured).
  3. Tags (t, i, title) are relay-indexed. A Djot table in content makes structured data readable in other wiki clients.
  4. Reviews cite the entity via ["a","30818:<pubkey>:<dTag>"] and copy all i tags for cross-platform lookup.

🔍 View an entity

✏️ Create / edit an entity

Log in first. Leave entity d-tag blank to create a new entity.

📋 Unsigned event (live preview)

When you click Publish, the composer emits nostr-wiki-submit. The raw unsigned event is shown below (sign & send with your own relay client if not using auto-publish).


      

Fill in the composer above to see the event preview here.

📦 Use via CDN (no build step)

<!-- 1. Load the bundle -->
<script type="module"
  src="https://saintego.github.io/nostr-post/nostr-post.js">
</script>

<!-- 2. Define your entity manifest -->
<script>
const BEER_MANIFEST = {
  id: "beer-entity-v1",
  version: "1.0.0",
  fields: [
    { id: 'title',       type: 'string', uiPlugin: 'text',   required: true,
      mapTo: { kind: 30818, target: "tag",     tagName: "title" } },
    { id: 'style',       type: 'string', uiPlugin: 'text',
      mapTo: { kind: 30818, target: "tag",     tagName: "t" } },
    { id: 'abv',         type: 'number', uiPlugin: 'number',
      mapTo: { kind: 30818, target: "table" } },
    { id: 'description', type: 'string', uiPlugin: 'textarea',
      mapTo: { kind: 30818, target: "content" } }
  ]
};
</script>

<!-- 3. Drop in the elements -->
<nostr-wiki-view   id="view"   entity-id="pliny-the-elder"></nostr-wiki-view>
<nostr-wiki-composer id="composer" auto-publish></nostr-wiki-composer>

<script type="module">
  // Wire the manifest (can't use HTML attributes for objects)
  document.getElementById('view').manifest     = BEER_MANIFEST;
  document.getElementById('composer').manifest = BEER_MANIFEST;
</script>