feat(embeds): geo/gpx/3D/YouTube/media keyword system + docs, sanitized mirrors

- new snippet geo_map_render.js: [map] inline geomaps (tree order, tint,
  theme-following), [gpx] stats card + elevation profile with hover cursor
  (km from start, d-height, vertical guide), [yt] privacy click-to-load
  facade, [video]/[audio] inline players fed from the new geoData indexes
- 3d_model_viewer.js: [cad] keyword + title/ID resolution via geoData.cad,
  sizes/captions, real occt-wasm ESM pair (fixes 'STEP worker error'),
  code-span-safe keyword scan (docs can show examples)
- blog_generator.js: buildGeoData() v6 – maps (geolocation + geoShape
  point/line/polygon + child GPX tracks), gpx/cad/media indexes,
  branch-change rebuild for route reordering
- generated/geo_data.js placeholder; docs/embed-keywords.md (new) +
  embed-3d-model Option D; README layout/wiring/notes tables updated
- license: runtime components (MapLibre ISC, VersaTiles MIT/ODbL, YouTube)
- hygiene: removed leaked note IDs and instance domain from theme docs
This commit is contained in:
trilium-share-gruvbox
2026-09-28 14:53:51 +02:00
parent 9e456bbaaa
commit 2818c40f96
10 changed files with 933 additions and 28 deletions
+14 -14
View File
@@ -1,7 +1,7 @@
# Switching the blog theme
The blog theme is **not** selected by a file name – it is controlled by the **`~shareCss` relation**
on the blog root note (`Richard's Blog`) inside Trilium. The relation points at a `text/css` note
on the blog root note (`Your Blog`) inside Trilium. The relation points at a `text/css` note
that holds the theme stylesheet. Everything below uses the notes of this repository's live blog;
note IDs are given for reference.
@@ -9,12 +9,12 @@ note IDs are given for reference.
| Theme | Repo file | Live note | Dark / light |
|---|---|---|---|
| **Ash (active)** | `theme/blog_share_theme_ash.css` | `OCbcTyzbQJA2` | panel/bone · ember+steel / paper+ink |
| Coffee (default) | `theme/blog_share_theme_coffee.css` | `NqZXcFRGi3II` | espresso / latte-cream |
| Harbor | `theme/blog_share_theme_harbor.css` | `Ep54EDTwKxup` | harbordark / paper |
| Gruvbox | `theme/blog_share_theme_gruvbox.css` | `edhL5cByGwqA` | gruvbox dark / light |
| Solarized | `theme/blog_share_theme_solarized.css` | `UFxPR5IpTyfj` | base03 / base3 |
| Tokyo Night | `theme/blog_share_theme_tokyonight.css` | `bf1OKYo3msZm` | storm / day |
| **Ash (active)** | `theme/blog_share_theme_ash.css` | `__THEME_ASH_ID__` | panel/bone · ember+steel / paper+ink |
| Coffee (default) | `theme/blog_share_theme_coffee.css` | `__THEME_COFFEE_ID__` | espresso / latte-cream |
| Harbor | `theme/blog_share_theme_harbor.css` | `__THEME_HARBOR_ID__` | harbordark / paper |
| Gruvbox | `theme/blog_share_theme_gruvbox.css` | `__THEME_GRUVBOX_ID__` | gruvbox dark / light |
| Solarized | `theme/blog_share_theme_solarized.css` | `__THEME_SOLARIZED_ID__` | base03 / base3 |
| Tokyo Night | `theme/blog_share_theme_tokyonight.css` | `__THEME_TOKYONIGHT_ID__` | storm / day |
All six themes include a `html.theme-light` + `html.theme-dark` block, theme-aware **3D viewer**
overlays and **Mermaid** rendering. The 3D viewer reads the theme's CSS variables
@@ -23,7 +23,7 @@ automatically to whichever theme is active – no script changes needed.
## How the active theme is resolved
1. The blog root note (`Richard's Blog`, `OKjkpgmXZY1L`) carries `~shareCss` → `blog_share_theme_*.css`.
1. The blog root note (`Your Blog`, `__BLOG_ROOT_ID__`) carries `~shareCss` → `blog_share_theme_*.css`.
2. The target note is a `code` note with mime `text/css` living under `.blog` (the share system note).
3. The public share renders the page and loads that note's CSS.
@@ -35,26 +35,26 @@ table above), so only the relation needs to change.
### Option A – via the Trilium UI
1. Find the target theme note under `.blog` (e.g. `blog_share_theme_gruvbox.css`).
2. Open `Richard's Blog` → Attributes → edit the `~shareCss` relation to point at that note.
2. Open `Your Blog` → Attributes → edit the `~shareCss` relation to point at that note.
3. Hard-refresh the blog (Ctrl+F5). Done.
### Option B – via ETAPI (scriptable)
```bash
TOKEN="your-etapi-token"
SERVER="https://notes.familie-zink.org"
SERVER="https://YOUR-TRILIUM.example.com"
# 1. Delete the current shareCss relation on the blog root (OKjkpgmXZY1L)
# 1. Delete the current shareCss relation on the blog root (__BLOG_ROOT_ID__)
curl -X DELETE "$SERVER/etapi/attributes/<attributeId>" -H "Authorization: $TOKEN"
# 2. Point shareCss at the desired theme note (example: Gruvbox edhL5cByGwqA)
# 2. Point shareCss at the desired theme note (example: Gruvbox __THEME_GRUVBOX_ID__)
curl -X POST "$SERVER/etapi/attributes" \
-H "Authorization: $TOKEN" -H "Content-Type: application/json" \
-d '{"noteId":"OKjkpgmXZY1L","type":"relation","name":"shareCss","value":"edhL5cByGwqA","isInheritable":true}'
-d '{"noteId":"__BLOG_ROOT_ID__","type":"relation","name":"shareCss","value":"__THEME_GRUVBOX_ID__","isInheritable":true}'
```
The attribute ID of the old `shareCss` relation can be looked up via
`GET $SERVER/etapi/notes/OKjkpgmXZY1L/attributes` (or the Trilium attribute list on the note).
`GET $SERVER/etapi/notes/__BLOG_ROOT_ID__/attributes` (or the Trilium attribute list on the note).
### Option C – create a fresh theme note from this repo