-
Notifications
You must be signed in to change notification settings - Fork 0
Publish and share
One click → a public HTML link of the notebook. No account required to view. The shared page is a single self-contained HTML document — no JavaScript, no fonts to fetch at view time, just the markdown + SQL + result snapshot the user saw.
- Open the notebook.
- Click the Share icon in the topbar.
- Click Publish current state.
- A share URL appears — copy it, open it in a new tab, or DM it.
Every publish mints a new token. Old links keep working until you revoke them. The dialog lists every live link with timestamps + a copy / open / revoke action per row.
The renderer in rednotebook/notebook/publisher.py walks the notebook
cell by cell:
- Markdown cells → fully rendered Markdown.
- SQL cells → syntax-highlighted code block + a snapshot of the cell's last result (table with up to 200 rows, plus the row-count + duration meta line).
- Ask AI cells → the user's prompt + the assistant's reply Markdown.
- Visualization cells → a compact "live chart rendering is omitted in the static page" note (charts need JS; we don't ship JS).
- Knowledge note cells → title + body Markdown.
A footer at the bottom reads:
Made with RedNotebook AI — open-source AI data notebook.
- Your live data source. The result is a snapshot — viewers see what you saw when you clicked Publish, not the result of running the query at view time.
- Your AI provider keys. Never sent.
- Anything from another notebook. Each publish is scoped to the notebook ID + the snapshots you supply.
| URL | Auth | Purpose |
|---|---|---|
POST /api/notebooks/{id}/publish |
required | Mints a token |
GET /api/notebooks/{id}/publish |
required | Lists active tokens |
DELETE /api/notebooks/{id}/publish/{token} |
required | Revokes |
GET /published/{token} |
public | Renders the snapshot |
The public viewer sets X-Robots-Tag: noindex so accidentally shared
links don't end up in search engines.
Right now the publish URL is served from your running RedNotebook AI
instance — fine for localhost and team-VPN deployments, less ideal
for sharing externally. Workarounds:
- Tunnel the instance temporarily (Cloudflare Tunnel, ngrok, Tailscale Funnel) — the share link works from anywhere.
-
Download + host yourself. The published HTML lives at
local_data/published/<token>.html. Drop it on GitHub Pages, S3, or any static host — it has zero runtime dependencies.
A "publish to GitHub Pages" button is a candidate follow-up — open an issue if you want it.
Click the trash icon next to any link in the Publish dialog. The underlying HTML file is deleted and the manifest entry removed; the URL returns 404 on next view. Other share links for the same notebook stay live.