Skip to content

Use the title in a location's file wherever the place is named - #6

Merged
berb merged 2 commits into
mainfrom
fix/location-title-from-its-file
Oct 17, 2026
Merged

berb merged 2 commits into
mainfrom
fix/location-title-from-its-file

Conversation

@berb

@berb berb commented Oct 17, 2026

Copy link
Copy Markdown
Owner

F-8a asks for each location page "with the title and description from its R-10 file". The title was read into the index (Location.Title) and never used: stage 3 built every place's name from its path, so the page, the chips on a photograph and the front-page lists all said "Norway » Bergen" whatever the file said.

Now stage 3 uses Location.Title. A place with no file, or no title in it, keeps its hierarchy (R-6): the index default changes from the last level ("Oslo") to the whole path ("Norway » Oslo"), so that the index and the site agree.

Judgment call, please check: this reads F-8a literally. The fixture's files say title: Bergen, so on the fixture site the Bergen page and chips now read "Bergen" rather than "Norway » Bergen". If the intent was always to show the hierarchy and let the title only override the page heading, the change is small: keep the path in placeRefs and named, and use loc.Title only for the page title. No existing test pins the old heading.

Tests: page title comes from the file; undescribed places are named by hierarchy in the index and on the page. Both fail on main. Golden index unchanged.

Each PR adds a line under Unreleased / Fixed in CHANGELOG.md, so merging several will conflict there; keep every line.

🤖 Generated with Claude Code

Claude Code and others added 2 commits October 17, 2026 07:41
… F-8a)

F-8a asks for each location page "with the title and description from its
R-10 file". The title was read into the index and then never used: stage 3
built every place's name from its path, so the page, the chips on a photograph
and the lists on the front page all said "Norway » Bergen" whatever the file
said. The description reached the page; the title did not.

An undescribed place keeps its hierarchy (R-6), now as the index's own default
title rather than the last level alone, so that the index and the site agree
about what a place is called. Stage 3 reads the title from the index.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…om-its-file

# Conflicts:
#	CHANGELOG.md
#	cmd/exposer/index.go
#	cmd/exposer/index_test.go
@berb
berb merged commit a7edba6 into main Oct 17, 2026
1 check passed
@berb
berb deleted the fix/location-title-from-its-file branch October 17, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant