feat: publish note lexicon!
This commit is contained in:
@@ -1,10 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lexicon": 1,
|
|
||||||
"id": "space.litenote.note",
|
|
||||||
"description": "Litenote's element",
|
|
||||||
"defs": {
|
"defs": {
|
||||||
"main": {
|
"main": {
|
||||||
"type": "record",
|
|
||||||
"description": "A markdown blog post with LaTeX, GitHub notes, Mermaid, YouTube and Bluesky extensions.",
|
"description": "A markdown blog post with LaTeX, GitHub notes, Mermaid, YouTube and Bluesky extensions.",
|
||||||
"key": "tid",
|
"key": "tid",
|
||||||
"record": {
|
"record": {
|
||||||
@@ -28,7 +24,10 @@
|
|||||||
"format": "datetime"
|
"format": "datetime"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"type": "record"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"id": "space.litenote.note",
|
||||||
|
"lexicon": 1
|
||||||
}
|
}
|
||||||
11
main.ts
11
main.ts
@@ -5,7 +5,7 @@ const jetstream = new Jetstream({
|
|||||||
"site.standard.graph.subscription",
|
"site.standard.graph.subscription",
|
||||||
"site.standard.publication",
|
"site.standard.publication",
|
||||||
"site.standard.document",
|
"site.standard.document",
|
||||||
"space.litenote.post",
|
"space.litenote.note",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -13,9 +13,9 @@ const jetstream = new Jetstream({
|
|||||||
jetstream.onCreate("site.standard.graph.subscription", (event) => {
|
jetstream.onCreate("site.standard.graph.subscription", (event) => {
|
||||||
// Check if it references litenote content
|
// Check if it references litenote content
|
||||||
const { did, commit } = event
|
const { did, commit } = event
|
||||||
console.log(did, commit);
|
console.log(did, commit);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
jetstream.onCreate("site.standard.publication", (event) => {
|
jetstream.onCreate("site.standard.publication", (event) => {
|
||||||
// Check if it references litenote content
|
// Check if it references litenote content
|
||||||
const { did, commit } = event
|
const { did, commit } = event
|
||||||
@@ -28,12 +28,13 @@ jetstream.onCreate("site.standard.document", (event) => {
|
|||||||
// Check if it references litenote content
|
// Check if it references litenote content
|
||||||
const { did, commit } = event
|
const { did, commit } = event
|
||||||
console.log(did, commit);
|
console.log(did, commit);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle your custom posts
|
// Handle your custom posts
|
||||||
jetstream.onCreate("space.litenote.post", (event) => {
|
jetstream.onCreate("space.litenote.note", (event) => {
|
||||||
// Process litenote-specific data
|
// Process litenote-specific data
|
||||||
|
const { did, commit } = event
|
||||||
|
console.log(did, commit);
|
||||||
});
|
});
|
||||||
|
|
||||||
jetstream.start();
|
jetstream.start();
|
||||||
Reference in New Issue
Block a user