Add blockchain whitepaper cards, glossary terms, guides, and search to any website. 4 widget types, 4 themes, Shadow DOM isolation, zero dependencies.
Copy and paste this code into your HTML to embed a whitepaper card:
<!-- Load widget -->
<script src="https://cdn.jsdelivr.net/npm/readwhitepaper-embed@1/dist/embed.min.js"></script>
<!-- Whitepaper card -->
<div data-readwhitepaper="entity" data-slug="bitcoin"></div>
<!-- Glossary term -->
<div data-readwhitepaper="glossary" data-slug="proof-of-work" data-theme="dark"></div>HTML
These widgets load data from the ReadWhitepaper API:
Four widget types to embed blockchain whitepaper content anywhere:
4 themes (light, dark, sepia, auto) and 2 styles (modern, minimal). The auto theme follows the user's system preference via prefers-color-scheme.
| Attribute | Values | Default |
|---|---|---|
data-readwhitepaper | entity, glossary, guide, search | Required |
data-slug | Whitepaper or term slug | Required |
data-theme | light, dark, sepia, auto | auto |
data-size | compact, default, large | default |
data-style-variant | modern, minimal | modern |
data-no-snippet | true (disable rich snippets) | Enabled |
The widget is served from jsDelivr CDN with automatic version pinning:
<!-- Recommended: jsDelivr (auto-cached, global CDN) -->
<script src="https://cdn.jsdelivr.net/npm/readwhitepaper-embed@1/dist/embed.min.js"></script>
<!-- Alternative: npm install -->
npm install readwhitepaper-embedSHELL
Examples of whitepapers you can embed with data-readwhitepaper="entity". Each links to the full whitepaper analysis on ReadWhitepaper.
All major Layer-1 protocols (Bitcoin, Ethereum, Solana, Cardano, Polkadot), Layer-2 scaling (Lightning, Optimism, Arbitrum, zkSync, Polygon), DeFi protocols (Uniswap, Aave, Compound, MakerDAO, Curve), oracles (Chainlink, Pyth), decentralized storage (Filecoin, Arweave, IPFS). Each rendered with key claim extraction + reading time.
Core blockchain concepts: Proof of Work, Proof of Stake, consensus algorithms, cryptography (zero-knowledge proofs, elliptic curves, hash functions), tokenomics, DeFi primitives (AMM, liquidity pool, impermanent loss), L2 scaling (rollup, fraud proof, validity proof), NFT standards (ERC-721, ERC-1155, ERC-4907). Full glossary index.
Yes. Set data-theme="auto" and the widget reads the user's prefers-color-scheme media query. Toggles automatically when the user switches OS dark mode. Also reacts to runtime changes via matchMedia event listener — no page reload needed.
Live. The widget fetches from the ReadWhitepaper REST API on render. Cache-Control honors origin headers (15-minute edge cache, 1-day stale-while-revalidate). New whitepapers appear in widgets without code update. OpenAPI 3.1 spec.
Under 15KB gzipped. Zero dependencies — no React, no jQuery, no fonts. Loads from jsDelivr CDN with HTTP/2 multiplexing. Shadow DOM isolation means CSS never conflicts with the host page. Lazy-rendered via IntersectionObserver.
Three customization axes: data-theme (light/dark/sepia/auto), data-size (compact/default/large), data-style-variant (modern/minimal). All combinations supported. CSS variables exposed for accent color override via Shadow DOM ::part() pseudo-elements.