Page {{define "title"}} blocks never render; every browser tab reads "Webhooker" #117
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found via a failing title assertion while doing the UI copy pass in #116.
parsePageTemplateparses the page file beforehtmlheader.html. That header contains{{block "title" .}}Webhooker{{end}}, which redefines the same template name and therefore wins. Every page's{{define "title"}}is dead: the browser tab reads "Webhooker" on every page regardless of what the page declares.Consequence beyond cosmetics: any title copy is silently inert, so it cannot be relied on and a title assertion in one page's test would pass for the wrong reason.
Definition of done
{{define "title"}}renders in the browser tab, withhtmlheader.html's block remaining the fallback for pages that declare none.Implementation requirements
htmlheader.htmlahead of the page file inparsePageTemplate'sParseFSarguments. Confirm that againsthtml/template's actual redefinition semantics rather than assuming.next, PR based onnext, single commit, title ending(closes #N).internal/handlers/handlers.goand a test file. Do not take on unrelated copy changes.make checkplusscript/cibuildwith the Docker cache defeated.