Skip to content

Broken author byline (%!s(<nil>)) on legacy pages whose author has no data/author profile #517

Description

@oalders

Legacy articles whose author key has no data/author/*.json profile render a broken byline. This is pre-existing (not caused by any recent paginator change) — surfaced during review of #509 / #265.

Symptoms

  • Listing pages (layouts/_default/li.html:17): <a href="/authors/{{ $author.key }}">{{ $author.name }}</a> renders as <a href="/authors/"></a> — an empty link pointing at the generic authors index.
  • Single article pages (layouts/_default/single.html:15): {{ printf "#author-bio-%s" $author.key }} leaks a Go nil-format string into the DOM: href="#author-bio-%!s(<nil>)".

Affected authors (missing profiles)

  • james-d-tisdall (e.g. content/legacy/_pub_2001_11_16_perlbio2.md)
  • sean-m--burke

Suggested fix

Either add the two data/author/*.json profiles (schema: name, key, bio, image), and/or guard the templates so a missing author lookup falls back to a title-cased slug instead of rendering an empty/nil link.

Found via /code-review-intense-flow (GEO lens) on #509.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions