Lightweight SolidOS shim with data island support.
solidos-lite lets you embed RDF data directly in HTML and render it with SolidOS - no server required. Just one script tag:
<scriptsrc="https://cdn.jsdelivr.net/npm/solidos-lite/solidos-lite.js"></script>It automatically:
- Loads mashlib from CDN
- Parses embedded Turtle or JSON-LD data islands
- Renders with SolidOS panes
<!DOCTYPE html><scripttype="text/turtle">
@prefixfoaf: <http://xmlns.com/foaf/0.1/> .<#me> a foaf:Person ; foaf:name "Alice" .
</script><scriptsrc="https://cdn.jsdelivr.net/npm/solidos-lite/solidos-lite.js"></script>That's it! Visit page.html#me to see Alice's profile.
<scripttype="text/turtle">
@prefixfoaf: <http://xmlns.com/foaf/0.1/> .<#me> a foaf:Person ; foaf:name "Alice" .
</script><scripttype="application/ld+json">{"@context": {"foaf": "http://xmlns.com/foaf/0.1/"},"@id": "#me","@type": "foaf:Person","foaf:name": "Alice"}</script>- Auto-detection - When the page loads, solidos-lite checks for data islands
- Loads mashlib - Dynamically loads mashlib + CSS from CDN
- Creates UI - Adds required DOM elements to body automatically
- Parses data - Turtle parsed directly, JSON-LD converted to Turtle (custom parser, no webpack chunks)
- Renders - Navigates to the URL fragment (e.g.,
#me) or shows document view
For manual control:
// Run everything automaticallySolidOSLite.run()// Or step by step:awaitSolidOSLite.loadMashlib()SolidOSLite.init({verbose: true})SolidOSLite.parseAllIslands()Initialize and run the data browser. Called automatically if data island detected.
Load mashlib from CDN. Returns a Promise.
Initialize the data island shim. Options: { verbose: true } for logging.
Parse all data islands into the RDF store.
Current version string.
- Person Profile (JSON-LD) - foaf:Person with photo and connections
- Bookmarks (Turtle) - Organized link collection
- minimal.html - Minimal Turtle example
- minimal-jsonld.html - Minimal JSON-LD example
- Zero boilerplate - Just data + script tag, UI created automatically
- No CORS issues - Data is in the page
- No server required - Works with static HTML files
- Works offline - Once loaded, no network needed
- Single script - Mashlib loaded automatically from CDN
AGPL-3.0