Skip to content

Instantly share code, notes, and snippets.

@melvincarvalho
Last active June 29, 2025 18:29
Show Gist options
  • Save melvincarvalho/9a8918f70ce82f179f2e1ce4937ccacd to your computer and use it in GitHub Desktop.
Save melvincarvalho/9a8918f70ce82f179f2e1ce4937ccacd to your computer and use it in GitHub Desktop.
bookmark.jsonld
{
"@context": {
"bookmark": "https://w3id.org/bookmark#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "https://schema.org/",
"dct": "http://purl.org/dc/terms/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@graph": [
/* ─────────────
Core class
───────────── */
{
"@id": "bookmark:Bookmark",
"@type": "rdfs:Class",
"rdfs:label": "Bookmark",
"rdfs:comment": "A user-saved pointer to a Web resource.",
"rdfs:subClassOf": { "@id": "schema:CreativeWork" }
},
/* ─────────────
Core fields
───────────── */
{
"@id": "bookmark:url",
"@type": "rdf:Property",
"rdfs:label": "url",
"rdfs:comment": "The page or resource the bookmark opens.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Resource",
"rdfs:subPropertyOf": "schema:url"
},
{
"@id": "bookmark:title",
"@type": "rdf:Property",
"rdfs:label": "title",
"rdfs:comment": "Human-readable label.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Literal",
"rdfs:subPropertyOf": "dct:title"
},
{
"@id": "bookmark:tags",
"@type": "rdf:Property",
"rdfs:label": "tags",
"rdfs:comment": "Keywords that organise bookmarks.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Literal",
"rdfs:subPropertyOf": "schema:keywords"
},
/* Epoch-seconds datestamps */
{
"@id": "bookmark:created",
"@type": "rdf:Property",
"rdfs:label": "created",
"rdfs:comment": "Unix timestamp (seconds) when the bookmark was first stored.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer",
"rdfs:subPropertyOf": "dct:created"
},
{
"@id": "bookmark:updated",
"@type": "rdf:Property",
"rdfs:label": "updated",
"rdfs:comment": "Unix timestamp (seconds) of the last metadata change.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer",
"rdfs:subPropertyOf": "dct:modified"
},
/* ─────────────
Reading state
───────────── */
{
"@id": "bookmark:isFavorite",
"@type": "rdf:Property",
"rdfs:label": "isFavorite",
"rdfs:comment": "Boolean flag: 0 = not starred, 1 = starred.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer"
},
{
"@id": "bookmark:isArchived",
"@type": "rdf:Property",
"rdfs:label": "isArchived",
"rdfs:comment": "Reading state: 0 = unread, 1 = archived.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer"
},
{
"@id": "bookmark:lastOpened",
"@type": "rdf:Property",
"rdfs:label": "lastOpened",
"rdfs:comment": "Unix timestamp (seconds) of the most recent user visit.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer"
},
/* ─────────────
Content hints
───────────── */
{
"@id": "bookmark:summary",
"@type": "rdf:Property",
"rdfs:label": "summary",
"rdfs:comment": "Short teaser or excerpt.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Literal",
"rdfs:subPropertyOf": "schema:description"
},
{
"@id": "bookmark:contentType",
"@type": "rdf:Property",
"rdfs:label": "contentType",
"rdfs:comment": "High-level media category: article, video, image….",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Literal"
},
{
"@id": "bookmark:wordCount",
"@type": "rdf:Property",
"rdfs:label": "wordCount",
"rdfs:comment": "Approximate word count of the target page.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer",
"rdfs:subPropertyOf": "schema:wordCount"
},
{
"@id": "bookmark:readTime",
"@type": "rdf:Property",
"rdfs:label": "readTime",
"rdfs:comment": "Estimated reading time in minutes.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "xsd:integer",
"rdfs:subPropertyOf": "schema:timeRequired"
},
{
"@id": "bookmark:thumbnailUrl",
"@type": "rdf:Property",
"rdfs:label": "thumbnailUrl",
"rdfs:comment": "Representative image for list/grid views.",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Resource",
"rdfs:subPropertyOf": "schema:thumbnailUrl"
},
/* ─────────────
Optional archive
───────────── */
{
"@id": "bookmark:archivedAt",
"@type": "rdf:Property",
"rdfs:label": "archivedAt",
"rdfs:comment": "Link to an archived copy (Wayback, IPFS…).",
"rdfs:domain": "bookmark:Bookmark",
"rdfs:range": "rdfs:Resource",
"rdfs:subPropertyOf": "schema:archivedAt"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment