Development record
The site's commit-history links still name the main branch: internal/core/site/explorer.go and graphpage.go build commits/main/ forge links, which 404 on a repository whose default branch is not main, while iss-2609261206437257's resolution says every forge file link names blob/HEAD. The history links should go through the same helper family and name commits/HEAD/, which the forge resolves to the default branch. Found while fixing it: the record page's link for a relative non-markdown target (explorer.go, the directory or file beside a record) builds <repository>/tree/main/ or /blob/main/ the same way, so it goes through the helper too.
The site's commit-history links still name the main branch: internal/core/site/explorer.go and graphpage.go build commits/main/ forge links, which 404 on a repository whose default branch is not main, while iss-2609261206437257's resolution says every forge file link names blob/HEAD. The history links should go through the same helper family and name commits/HEAD/, which the forge resolves to the default branch. Found while fixing it: the record page's link for a relative non-markdown target (explorer.go, the directory or file beside a record) builds <repository>/tree/main/ or /blob/main/ the same way, so it goes through the helper too.
Grounds
- pursued: no rendered page of the fixture site carries blob/main, tree/main or commits/main while each HEAD kind appears; a rendered page carrying any of the three would show it wrong
Frontmatter
| id | iss-2609261241126008 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609261241126008-site-history-links-name-main.md
open on GitHub ↗ · commit history ↗
mentions1
- iss-2609261206437257The site renderer links a repository file on the forge through a hard-coded blob/main path (internal/core/site/compose.go siteHref and seven sibling sites in compose.go, csl.go, explorer.go and graphpage.go), so a managed repository whose default branch is not main serves forge links that 404; the build reads no forge, and blob/HEAD names the default branch whatever it is