|
| 1 | +# Author profiles: enrich taxonomy term pages, keep the display name as the key |
| 2 | + |
| 3 | +Authors are a Hugo taxonomy derived from the `authors:` frontmatter on ~1,045 articles |
| 4 | +and podcast episodes (see [[Author]] in `CONTEXT.md`). The term pages at `/authors/<name>/` |
| 5 | +are auto-generated and show only a name and a content list. To let an Author describe |
| 6 | +themselves (avatar, tagline, bio, links), we enrich each term page with an **optional** |
| 7 | +content file at `content/authors/<slug>/_index.md`. Profiles are **opt-in via PR** — not |
| 8 | +pre-scaffolded — so most Authors have no file and must keep rendering correctly. |
| 9 | + |
| 10 | +The load-bearing decision is what gets stored in every article's `authors:` frontmatter. |
| 11 | +We keep the **display name** there (`authors: [James Petty]`), exactly as today. The name |
| 12 | +is both the byline and the source of the Profile slug — the stable key. A Profile may set |
| 13 | +a **preferred name** that overrides only how the name is *displayed*; it never changes the |
| 14 | +slug or the byline. Authors without a Profile render their author name unchanged. |
| 15 | + |
| 16 | +## Considered options |
| 17 | + |
| 18 | +- **Slug as the key** (`authors: [james-petty]`, display name rendered from the Profile) — |
| 19 | + rejected. It decouples slug from name, but the display name would then live *only* in the |
| 20 | + Profile. With ~70 of 80 Authors un-enriched at launch, their bylines and cards would fall |
| 21 | + back to a humanized slug — `darren-mar-elia` → "Darren Mar Elia" (wrong hyphen), |
| 22 | + `jasonmorgan` → "Jasonmorgan". It also forces a repo-wide migration of all 1,045 files. |
| 23 | +- **Display name as the key, with an optional preferred-name override** — chosen. Zero |
| 24 | + migration, correct bylines for every Author for free, and the changeable-display-name |
| 25 | + benefit is preserved for those who opt in. The only thing it gives up is a slug decoupled |
| 26 | + from the original name — but the slug is a URL we want stable anyway, and renaming it is a |
| 27 | + redirect-and-find/replace job in *either* model. |
| 28 | + |
| 29 | +A central `data/authors.yaml` was also rejected in favor of taxonomy term content files: |
| 30 | +term files bind to the existing `/authors/<name>/` page automatically and carry a Markdown |
| 31 | +bio, which a data file cannot do naturally. |
| 32 | + |
| 33 | +## Consequences |
| 34 | + |
| 35 | +- The profile content file's directory **must** equal Hugo's slug of the exact author |
| 36 | + string; a mismatch yields an orphan page that enriches nothing. A `new-author.ps1` |
| 37 | + scaffolder generates the file with the right slug, and a build-time check flags author |
| 38 | + content files whose slug matches no taxonomy term. |
| 39 | +- Renaming a slug is the rare, deliberate case: `new-author.ps1` rewrites the term across |
| 40 | + content and adds an `aliases` redirect on the Profile to preserve the old URL. |
| 41 | +- Avatars resolve `avatar` → `gravatar_hash` → `email` → `identicon` fallback. Raw `email` |
| 42 | + is convenient but lands in the public repo; `gravatar_hash` lets the privacy-conscious |
| 43 | + avoid that, and an explicit `avatar` image bypasses Gravatar entirely. |
| 44 | +- The Author list orders enriched profiles first, then by count, so a partially-filled grid |
| 45 | + reads as intentional rather than sparse. |
0 commit comments