Thumbnails: accept thumb.<ext> or *_thumb.<ext> child notes, auto-hide them from menu (shareHiddenFromTree), keep first-image fallback

This commit is contained in:
trilium-share-gruvbox
2026-08-28 20:41:54 +02:00
parent af584101eb
commit e224dea9aa
2 changed files with 21 additions and 5 deletions
+6 -4
View File
@@ -51,10 +51,12 @@ CSS file (Gruvbox, light + dark, theme toggle without reload).
- **Dates**: all visible dates (post cards, garden table) are rendered by the generator's
`dateText()` helper as `Fri 2026-08-28` (English weekday + ISO date); `blog_data.date`
stays ISO for sorting, `blog_data.dateText` is added for display. JSON-LD keeps ISO dates.
- **Thumbnails** (`thumbSrc()`): prefer a child note of the article titled `*_thumb.*`
(e.g. `ngc281_thumb.jpg`) → `api/notes/<id>/download`; otherwise use the first `<img>`
from the note content. Layout: image left, summary right (`.blog-post-inner`),
`max-height:256px`, lazy-loaded. **There is no server-side resizing** see "Limitations".
- **Thumbnails** (`thumbSrc()`): prefer a child note of the article titled `thumb.<ext>` **or**
`*_thumb.<ext>` (e.g. `thumb.png`, `ngc281_thumb.jpg`) → `api/notes/<id>/download`; otherwise
use the first `<img>` from the note content. Layout: image left, summary right (`.blog-post-inner`),
`max-height:256px`, lazy-loaded. The generator auto-sets `shareHiddenFromTree` on matching
thumb child notes so they never appear in the blog menu. **There is no server-side resizing**
see "Limitations".
- Regenerates `feed.xml`, `sitemap.xml`, `state_map` (garden states) and `blog_data`
(search index: id/title/url/summary/tags/category). Sets `shareDescription` from `summary`.