# Switching to a New Trip The active trip lives in **one** place: `user/config/site.yaml` → `active_trip`. Set it, create the new page tree, push. > **Changed 2026-07:** this used to require editing two files in lockstep (`site.yaml` **and** `post-form.md` → `pageconfig.parent`), and they silently desynced. The `cache-on-save` plugin now derives the write target from `site.active_trip` at submit time (`onFormValidationProcessed` → `setData('parent', …)`), so `post-form.md` no longer carries a `parent` at all. **Do not re-add one** — it would override the derived target and reintroduce the desync. --- ## Checklist - [ ] Update `user/config/site.yaml` → `active_trip` - [ ] Create the new trip page tree (see below) - [ ] Run `make content-push` to push the changes to production --- ## Step 1 — Update site.yaml In `user/config/site.yaml`, set `active_trip` to the new trip's **route**: ```yaml active_trip: /trips/denmark-2026 # ← change this ``` The final segment must exactly match the folder name under `user/pages/01.trips/`. You can also set this from Admin → Configuration → Site → **Active Trip** (a page-picker rooted at `/trips`; blueprint at `user/blueprints/config/site.yaml`). > `system.yaml` → `home.alias` is permanently `/home` (the real home page) and does **not** change when switching trips. --- ## Step 2 — Create the new trip page tree Create the two content subfolders under `user/pages/01.trips//`: ``` user/pages/01.trips/denmark-2026/ ├─ trip.md ← title, date_start, date_end, cover_image, album_url ├─ *.gpx ← route files (optional; page media, auto-detected) ├─ 01.dailies/ │ └─ dailies.md ← inert container: template: default, routable: false, visible: false └─ 04.stories/ └─ stories.md ← inert container: template: default, routable: false, visible: false ``` Copy these files from an existing trip and update the frontmatter (especially `title` and `date_start` in `trip.md`). > The `02.map/` and `03.stats/` standalone views were retired (2026-07-04) — the map and stats render inline on the trip page. The `01.dailies/` and `04.stories/` folders now exist only as data containers holding the entry/story children; their own routes are non-routable. Do **not** recreate `02.map/` or `03.stats/`. Fields in `trip.md` to update: | Field | Example | Notes | |---|---|---| | `title` | `Denmark 2026` | Displayed in nav and trip header | | `date_start` | `2026-07-15` | Used for "X days on the road" stat | | `date_end` | *(leave blank while travelling)* | Set when you return | | `cover_image` | `cover.jpg` | Shown on the trips listing page | | `album_url` | `https://...` | Optional external album link | --- ## Step 3 — Push ```bash make content-push ``` This commits and pushes the `user/` repo to Gitea. The webhook triggers a production pull automatically. --- ## Verify After pushing, check: 1. Home page shows the new trip (title and date) 2. Submit a test entry via `/post` — verify it lands under `user/pages/01.trips//01.dailies/` and appears in the feed at `/trips/` 3. The inline map on `/trips/` shows the correct (empty or GPX-only) state