SEO: custom share template (canonical, per-page OG, JSON-LD, robots), robots.txt, OG banner; generator sets shareOpenGraphURL; ignis module STEP example

This commit is contained in:
trilium-share-gruvbox
2026-08-28 16:54:32 +02:00
parent e13a5433d9
commit 71d6311e49
9 changed files with 416 additions and 5 deletions
+8
View File
@@ -91,6 +91,14 @@ CSS file (Gruvbox, light + dark, theme toggle without reload).
`_thumb` child-note convention for small thumbnails.
- Built-in share footer navigation and book children list are hidden
(`#content-footer .navigation`, `#index`).
- **SEO**: a custom share template (`templates/share/page.ejs`, note `share template`,
`application/x-ejs`, wired via `~shareTemplate` inheritable on the blog root, with
`tree_item`/`prev_next`/`toc_item` partials as children) adds per-page canonical,
`og:url`/`og:image`/`og:type`, Twitter cards, JSON-LD (WebSite/BlogPosting/CollectionPage)
and `index,follow`. The generator's `ensureSeoMeta()` sets `shareDescription` +
`shareOpenGraphURL` on every published note and category. `robots.txt`
(`shareAlias=robots.txt`, `shareRaw`) points at the sitemap; `~shareOpenGraphImage`
on the blog root sets the default OG image.
## Limitations / gotchas