NIP-54 collaborative entity pages — kind:30818
kind:30818 event for the same d-tag (entity slug).t, i, title) are relay-indexed. A Djot table in content makes structured data readable in other wiki clients.["a","30818:<pubkey>:<dTag>"] and copy all i tags for cross-platform lookup.Log in first. Leave entity d-tag blank to create a new entity.
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.
<!-- 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>