vienalatina/themes
Claude ff8effaf3a
Fix a build break I shipped in the last commit
`{{ partial "t.html" (dict "key" "by" "lang" .Site.Language.Lang) }}`
inside `{{ with .Params.author }}`, where the dot is the author *string*.
`.Site` on a string is an execution error, so the build fails — and with
--panicOnWarning in the pipeline, the whole publish fails with it. Same
again for `faq`, where the dot is a slice.

It would have gone red on your first deploy: Salvador's post carries an
author.

My build check passed because every post in the fixture had neither an
author nor a faq, so the two broken branches were never rendered. That
is the actual mistake — not the dot, which is an easy slip, but checking
a change to an optional branch with content that never takes it. The
fixture now carries a post with author, author_url, faq, event, image,
ai_generated and pinned all set at once.

The rule is now "always `$.`" rather than "think about where you are":
`$` is the page in every context, a bare `.` is only the page at top
level, and the difference is invisible until a post happens to have the
field. All sixteen call sites converted, and a test holds every one of
them to it — proved by putting the bug back and watching it fail.

Also the doc comment in t.html, which still claimed eleven keys. My
replacement for it last commit silently matched nothing: I asserted on
every other replacement in that script and not on this one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-10-14 13:19:08 +00:00
..
vienalatina Fix a build break I shipped in the last commit 2026-10-14 13:19:08 +00:00