docs: sync CLAUDE.md + reference/guides with standalone-page cleanup
- Replace 'Shared feed-map partial' section with 'entry-map' partial + the single MapUtils.initEntryMap map path - Trip architecture: two content subfolders (dailies/stories as inert routable:false containers); map/stats inline on trip page - Fix stale references to deleted map/stats/dailies/stories templates in architecture.md (template list, page tree, GPX flow) and trip-switching.md (scaffold + verify steps) - Correct GPX rendering: toGeoJSON bundled in map.js, no leaflet CDN - Pre-launch smoke test now checks the trip page feed, not /dailies Left docs/working/* (milestones, learnings, QA, plans) as point-in-time history. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -42,23 +42,21 @@ pageconfig:
|
||||
|
||||
## Step 3 — Create the new trip page tree
|
||||
|
||||
Create the standard four subfolders under `user/pages/01.trips/<new-slug>/`:
|
||||
Create the two content subfolders under `user/pages/01.trips/<new-slug>/`:
|
||||
|
||||
```
|
||||
user/pages/01.trips/japan-korea-2026/
|
||||
├─ trip.md ← title, date_start, date_end, cover_image, album_url
|
||||
├─ 01.dailies/
|
||||
│ └─ dailies.md ← template: dailies (list page)
|
||||
├─ 02.map/
|
||||
│ └─ map.md ← template: map
|
||||
├─ 03.stats/
|
||||
│ └─ stats.md ← template: stats
|
||||
│ └─ dailies.md ← inert container: template: default, routable: false, visible: false
|
||||
└─ 04.stories/
|
||||
└─ stories.md ← template: 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.
|
||||
|
||||
Fields in `trip.md` to update:
|
||||
|
||||
| Field | Example | Notes |
|
||||
@@ -85,5 +83,5 @@ This commits and pushes the `user/` repo to Gitea. The webhook triggers a produc
|
||||
|
||||
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/<new-slug>/01.dailies/`
|
||||
3. Map at `/trips/<new-slug>/map` shows the correct (empty or GPX-only) state
|
||||
2. Submit a test entry via `/post` — verify it lands under `user/pages/01.trips/<new-slug>/01.dailies/` and appears in the feed at `/trips/<new-slug>`
|
||||
3. The inline map on `/trips/<new-slug>` shows the correct (empty or GPX-only) state
|
||||
|
||||
@@ -13,8 +13,8 @@ How the intotheeast site hangs together.
|
||||
| Container | Docker (`getgrav/grav` base + custom `Dockerfile`) | Grav 2.0 baked in at build time |
|
||||
| PHP session | `session.save_path = /tmp` | Set in `php/php-local.ini` |
|
||||
| Dev URL | http://localhost:8081 | Mapped from container port 80 |
|
||||
| Maps | MapLibre GL JS | Replaced Leaflet; all 3 map templates use it |
|
||||
| GPX rendering | maplibre-gl-leaflet-gpx (CDN) | Renders GPX files as route layers |
|
||||
| Maps | MapLibre GL JS | Replaced Leaflet; one shared map path (`MapUtils.initEntryMap`) on trip + home |
|
||||
| GPX rendering | toGeoJSON (bundled in `js/map.js`) | Parses GPX → GeoJSON route layers client-side; no CDN |
|
||||
|
||||
---
|
||||
|
||||
@@ -62,15 +62,13 @@ templates/
|
||||
├─ home.html.twig ← extends base; context-aware two-column layout
|
||||
├─ trip.html.twig ← extends base; trip page with filter bar (All/Journal/Stories)
|
||||
├─ entry.html.twig ← extends base; single journal entry (gallery, badges, map)
|
||||
├─ dailies.html.twig ← extends base; journal feed list
|
||||
├─ map.html.twig ← extends base; full-height MapLibre trip map
|
||||
├─ stats.html.twig ← extends base; trip stats (days, distance, elevation)
|
||||
├─ stories.html.twig ← extends base; stories grid
|
||||
├─ story.html.twig ← extends base; single story (Ken Burns hero, shortcodes)
|
||||
└─ gpx-manager.html.twig ← extends base; admin UI for GPX file management
|
||||
```
|
||||
|
||||
Partials live in `templates/partials/`. Currently one partial: `base.html.twig` (the site shell extended by all page templates).
|
||||
The standalone `dailies.html.twig`, `map.html.twig`, `stats.html.twig` and `stories.html.twig` view templates were **removed** in the 2026-07-04 standalone-page cleanup — the trip page (`trip.html.twig`) consolidated the feed, inline map, and inline stats.
|
||||
|
||||
Partials live in `templates/partials/` (plus macros in `templates/macros/`). Key partials: `base.html.twig` (site shell extended by all page templates), `entry-map.html.twig` (shared map column + `initEntryMap` call, used by trip + home), `trip-feed-col.html.twig` (feed column chrome, shared by trip + home), `home-predeparture.html.twig`, `entry-journal.html.twig` / `entry-story.html.twig` (feed cards), and `weather-icons.html.twig`.
|
||||
|
||||
---
|
||||
|
||||
@@ -82,13 +80,13 @@ The site is organized around Trip entities. The active trip is set in `user/conf
|
||||
user/pages/01.trips/
|
||||
└─ japan-korea-2026/
|
||||
├─ trip.md ← template: trip; title, date_start, cover_image, album_url
|
||||
├─ *.gpx ← GPX route files (served as page media; auto-detected by map.html.twig)
|
||||
├─ 01.dailies/ ← journal entries (template: dailies list + entry children)
|
||||
├─ 02.map/map.md ← template: map
|
||||
├─ 03.stats/stats.md ← template: stats
|
||||
└─ 04.stories/ ← story pages (template: stories list + story children)
|
||||
├─ *.gpx ← GPX route files (served as page media; auto-detected by trip.html.twig)
|
||||
├─ 01.dailies/ ← journal entry children (container .md is routable:false)
|
||||
└─ 04.stories/ ← story children (container .md is routable:false)
|
||||
```
|
||||
|
||||
`01.dailies/` and `04.stories/` are inert data containers — the trip page aggregates their children; visiting the container routes directly 404s/redirects. (The former `02.map/` and `03.stats/` folders were removed with their view templates.)
|
||||
|
||||
---
|
||||
|
||||
## GPX data flow
|
||||
@@ -100,10 +98,10 @@ GPX file uploaded to trip page media
|
||||
user/pages/01.trips/<slug>/*.gpx
|
||||
│
|
||||
▼
|
||||
map.html.twig: trip_page.media.all → filter .gpx files → pass as JS array
|
||||
trip.html.twig / home.html.twig: trip_page.media.all → filter .gpx → entry-map partial
|
||||
│
|
||||
▼
|
||||
MapLibre source: each GPX file added as a GeoJSON source via maplibre-gl-leaflet-gpx
|
||||
MapLibre source: each GPX file parsed by toGeoJSON (bundled in js/map.js) → GeoJSON source
|
||||
│
|
||||
▼
|
||||
Connector suppression: same-file 10km proximity check prevents spurious inter-track segments
|
||||
|
||||
Reference in New Issue
Block a user