Note that html_full can reference Daybook's own vendored JS libraries
Grid.js and renderjson (vendored for the csv/json kinds) are reachable as plain static files from any artifact, including html_full - a better default than an external CDN for table/JSON rendering specifically, since it works offline and has no third-party dependency. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
91ea19d26b
commit
4145c37dfe
1 changed files with 18 additions and 0 deletions
|
|
@ -71,6 +71,24 @@ Tailwind's in-browser compiler) without internet access. If the deployment
|
|||
target is offline, don't reach for these — use `markdown`/`html_fragment`
|
||||
instead, which are styled entirely server-side with no external requests.
|
||||
|
||||
**Self-hosted alternative for tables/JSON — no CDN needed:** Daybook already
|
||||
vendors Grid.js and renderjson locally (used to render `csv`/`json`
|
||||
artifacts), and they're reachable as plain static files from any artifact,
|
||||
including `html_full`:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="/static/vendor/gridjs/mermaid.min.css">
|
||||
<script src="/static/vendor/gridjs/gridjs.umd.js"></script>
|
||||
<!-- or, for a collapsible JSON tree: -->
|
||||
<script src="/static/vendor/renderjson/renderjson.js"></script>
|
||||
```
|
||||
|
||||
Prefer these over an external CDN for table/JSON rendering inside a custom
|
||||
`html_full` page — same libraries, but self-hosted, so they work offline
|
||||
and don't depend on a third party staying up. This only covers
|
||||
tables/JSON; there's no vendored equivalent for Tailwind/Chart.js, so the
|
||||
CDN snippets above are still the only option for those.
|
||||
|
||||
Only use this for `html_full` specifically — never add CDN references to
|
||||
`markdown`/`html_fragment`/`deck`. Those kinds exist so Daybook, not the
|
||||
poster, owns styling; injecting a default CDN habit into them would
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue