docs: move template behaviour to README; remove from CLAUDE.md

This commit is contained in:
2026-06-21 11:10:24 +02:00
parent 461df550a1
commit 6d2723e6f2
2 changed files with 20 additions and 1 deletions
-1
View File
@@ -31,7 +31,6 @@ The site is structured around Trip entities. Key facts:
- Site nav in `base.html.twig` has Home + Past Trips only — does not link to trip sub-sections
- Post form parent (`post-form.md``pageconfig.parent`) **must be kept in sync** with `active_trip`
- The trip page (`trip.html.twig`) uses a **client-side filter bar** (All content / Journal / Stories) — do NOT add nav links back to `/dailies`, `/stats`, `/stories` on the trip page
- **Sort order is intentionally different per context:** `trip.html.twig` sorts ascending (`sort_by_key('date', 4)`) so the trip reads chronologically from start to finish; `home.html.twig` active-trip mode sorts descending (`sort_by_key('date', 3)`) so the latest entry appears first
- Stats are shown inline on the trip page via a toggle; the standalone `/stats` sub-page still exists as a URL but is not linked from the trip page
- GPX route files live as media on the trip page itself, served via leaflet-gpx CDN
- Manage GPX files (view/upload/delete) at `/gpx-manager` — requires admin login; filenames are auto-slugified on upload
+20
View File
@@ -131,6 +131,26 @@ Plugins are not committed to git. The full list is in `plugins.txt` — one plug
---
## Template behaviour
Key design decisions that affect how pages render:
| Context | Sort order | Reason |
|---------|------------|--------|
| Trip page (`trip.html.twig`) | Ascending (oldest first) | Trip reads as a narrative from start to finish |
| Homepage active-trip feed (`home.html.twig`) | Descending (newest first) | Visitors want to see what's happening right now |
**Homepage modes** — controlled by `travelling` in `user/config/site.yaml`:
| `travelling` | Homepage shows |
|---|---|
| `true` | Active trip map + chronological feed (newest first) |
| `false` | Map with highlight markers + curated highlights grid (max 6, 1 per trip, random) |
Entries and stories opt into the highlights grid via `featured: true` in their frontmatter. The `active_trip` field stores a full page route (e.g. `/trips/italy-2026-demo`), not a bare slug.
---
## Security
- `.env` is gitignored. Never commit it — it contains your server credentials and Gitea token.