feat: blob images

This commit is contained in:
Julien Calixte
2026-02-08 15:12:41 +01:00
parent fa3481b071
commit 9f2a34554b
3 changed files with 297 additions and 11 deletions

View File

@@ -1,14 +1,14 @@
{
"lexicon": 1,
"id": "space.litenote.note",
"defs": {
"main": {
"type": "record",
"description": "A markdown blog post with LaTeX, GitHub notes, Mermaid, YouTube and Bluesky extensions.",
"key": "tid",
"record": {
"type": "object",
"required": [
"title",
"content"
],
"required": ["title", "content"],
"properties": {
"title": {
"type": "string",
@@ -16,9 +16,15 @@
},
"content": {
"type": "string",
"description": "Markdown content of the blog post",
"description": "Markdown content. Local image paths are replaced with blob CIDs at publish time.",
"maxLength": 10000
},
"images": {
"type": "array",
"description": "Blob references for images embedded in the markdown content.",
"items": { "type": "ref", "ref": "#image" },
"maxLength": 20
},
"publishedAt": {
"type": "string",
"format": "datetime"
@@ -28,10 +34,24 @@
"format": "datetime"
}
}
},
"type": "record"
}
},
"image": {
"type": "object",
"descriptions": "Images from the markdown content, separately uploaded and link in markdown content with blob CID.",
"required": ["image"],
"properties": {
"image": {
"type": "blob",
"accept": ["image/*"],
"maxSize": 2000000
},
"alt": {
"type": "string",
"maxLength": 2000,
"description": "Alt text for the image."
}
}
}
},
"id": "space.litenote.note",
"lexicon": 1
}
}
}