**Note**: The `published_at` tag is automatically generated with the current UNIX timestamp during event creation for all replaceable event kinds. It should not be included in metadata and will be ignored if present.
@ -175,8 +176,8 @@ All tag values are normalized per NKBIP-08 spec (lowercase, hyphens, numbers onl
@@ -175,8 +176,8 @@ All tag values are normalized per NKBIP-08 spec (lowercase, hyphens, numbers onl
- **Two-level structure** (book + chapters): 30041 events are chapters (c tag from chapter title, no s tag)
- **Three-level structure** (book + chapters + sections): 30041 events are sections (c tag from parent chapter, s tag from section title)
- All nested 30041 events inherit C tag (collection_id) and v tag (version_tag) from root 30040
@ -186,6 +187,8 @@ All tag values are normalized per NKBIP-08 spec (lowercase, hyphens, numbers onl
@@ -186,6 +187,8 @@ All tag values are normalized per NKBIP-08 spec (lowercase, hyphens, numbers onl
All predefined metadata fields are shown in frontmatter/attributes with placeholder descriptions. Remove or update placeholders you don't need. Placeholder values are automatically skipped when creating events.
**Important**: The `published_at` tag is automatically generated with the current UNIX timestamp during event creation for all replaceable event kinds (all event kinds supported by this plugin). Do not include `published_at` in your metadata - it will be automatically added and any existing `published_at` values in metadata will be ignored.
### Common Fields
- `kind` - Event kind (required)
@ -198,7 +201,7 @@ All predefined metadata fields are shown in frontmatter/attributes with placehol
@@ -198,7 +201,7 @@ All predefined metadata fields are shown in frontmatter/attributes with placehol
@ -211,7 +214,7 @@ All predefined metadata fields are shown in frontmatter/attributes with placehol
@@ -211,7 +214,7 @@ All predefined metadata fields are shown in frontmatter/attributes with placehol
- `version_tag` - NKBIP-08 version identifier (v tag) - If set in root 30040, inherited by all events in the hierarchy
**30041 (Publication Content)**:
- **Stand-alone**: Same as 30023 (image, summary, published_at, topics)
- **Stand-alone**: Same as 30023 (image, summary, topics)
- **Nested** (under 30040): NKBIP-08 tags
- `collection_id` - Inherited from root 30040 (C tag)
// If body is empty or only whitespace, add default content
consttrimmedBody=body.trim();
letfinalBody=body;
if(!trimmedBody||trimmedBody.length===0){
// For kind 1, just add placeholder text (no header)
if(metadata.kind===1){
finalBody=`place your content here\n\n---\n\n**How to use this app:**\n1. Edit your content above\n2. Click the Nostr menu button (lightning bolt icon ⚡) in the left sidebar\n3. Select "Create Nostr events" to create and sign events\n4. Select "Publish events to relays" to publish to relays`;
}else{
// For other kinds, add level-one header (#) with default text
finalBody=`# This is the first header in this document\n\nplace your content here\n\n---\n\n**How to use this app:**\n1. Edit your content above\n2. Click the Nostr menu button (lightning bolt icon ⚡) in the left sidebar\n3. Select "Create Nostr events" to create and sign events\n4. Select "Publish events to relays" to publish to relays`;