Skip to content

feat(authors): add a per-author name-highlight flag (owner by default)#3343

Open
Vidminas wants to merge 1 commit into
HugoBlox:mainfrom
Vidminas:feat/author-highlight-name
Open

feat(authors): add a per-author name-highlight flag (owner by default)#3343
Vidminas wants to merge 1 commit into
HugoBlox:mainfrom
Vidminas:feat/author-highlight-name

Conversation

@Vidminas

Copy link
Copy Markdown

page_metadata_authors already had a $highlight_name flag and a font-bold branch, but it was hardcoded to false, so author names were never emphasised in citation/publication author lists.

Add an optional per-author highlight_name bool (surfaced by get_author_profile) that controls whether an author's name is emphasised:

  • set highlight_name: true to highlight any author (e.g. yourself as a co-author), or false to opt out;
  • when unset it falls back to is_owner (from is_owner: true / legacy superuser: true), so the site owner is highlighted by default.

The fallback uses ne … nil rather than | default so an explicit highlight_name: false opts the owner out instead of being read as unset.

Documented in get_author_profile's output contract (header comment) and as a commented example in the academic-cv me.yaml author file.

πŸš€ What type of change is this?

  • πŸ› Bug fix (A non-breaking change that fixes an issue)
  • ✨ New feature (A non-breaking change that adds functionality)
  • πŸ’… Style change (A change that only affects formatting, visuals, or styling)
  • πŸ“š Documentation update (Changes to documentation only)
  • 🧹 Refactor or chore (A code change that neither fixes a bug nor adds a feature)
  • πŸ’₯ Breaking change (A fix or feature that would cause existing functionality to not work as expected)

🎯 What is the purpose of this change?

page_metadata_authors.html already contains a $highlight_name variable and a font-bold
render branch β€” but $highlight_name is hardcoded to false and never set, so author names
are never emphasised in a citation or publication author list.

Change. Add an optional per-author highlight_name bool (surfaced by get_author_profile)
that controls whether that author's name is emphasised:

  • highlight_name: true β†’ highlight this author (e.g. yourself as a co-author); false β†’ opt out;
  • when unset, it defaults to is_owner (from is_owner: true, or the legacy superuser: true),
    so the site owner is bold out of the box with no extra config.

So the owner is highlighted by default, but it's no longer forced β€” any author can opt in or out,
and the owner can opt out. It's a single author-data field alongside the existing is_owner; no
block- or site-level config knob is added. The fallback uses ne … nil (not | default) so an
explicit highlight_name: false opts the owner out rather than being read as "unset".

Verified on the academic-cv starter (data/authors/me.yaml has is_owner: true):

  • default β€” the owner "Dr. Alex Johnson" renders font-bold (3Γ—) in the homepage "Recent
    Publications" list, co-authors plain; on main nothing is bold;
  • owner opts out (highlight_name: false on me.yaml) β€” the owner renders plain;
  • co-author opts in (highlight_name: true on a co-author's data file) β€” that name renders font-bold.

πŸ“Έ Screenshots or Screencast (if applicable)

The homepage "Recent Publications" (citation view) on the academic-cv starter, in both light and
dark themes
. The owner "Dr. Alex Johnson" is emphasised, while co-author "Robert Ford"
stays regular weight β€” so the owner's name stands out in the multi-author citations.

Before β€” main (owner's name plain, indistinguishable from co-authors):

Light Dark
owner plain, light theme owner plain, dark theme

After β€” this PR (owner's name bold):

Light Dark
owner bold, light theme owner bold, dark theme

ℹ️ Documentation Check

  • No, this change does not require a documentation update.
  • Yes, I have updated the documentation accordingly (or will in a follow-up PR).

Documented in-branch: the field is listed in get_author_profile.html's output contract (its
header comment), and shown as a commented, explained example next to is_owner in the academic-cv
me.yaml author file.

(Only academic-cv's me.yaml carries the example so far; happy to mirror it into the other starters' author files if the maintainers would prefer. The hosted docs at docs.hugoblox.com also need highlight_name added
to the author-data reference.)


πŸ“œ Contributor Agreement

Thank you for your contribution!

page_metadata_authors already had a `$highlight_name` flag and a `font-bold`
branch, but it was hardcoded to `false`, so author names were never emphasised
in citation/publication author lists.

Add an optional per-author `highlight_name` bool (surfaced by get_author_profile)
that controls whether an author's name is emphasised:

- set `highlight_name: true` to highlight any author (e.g. yourself as a
  co-author), or `false` to opt out;
- when unset it falls back to `is_owner` (from `is_owner: true` / legacy
  `superuser: true`), so the site owner is highlighted by default.

The fallback uses `ne … nil` rather than `| default` so an explicit
`highlight_name: false` opts the owner out instead of being read as unset.

Documented in get_author_profile's output contract (header comment) and as a
commented example in the academic-cv `me.yaml` author file.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Vidminas
Vidminas requested a review from gcushen as a code owner July 12, 2026 11:32
@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

❌ Deploy Preview for academic-demo failed. Why did it fail? β†’

Name Link
πŸ”¨ Latest commit 0fae3ab
πŸ” Latest deploy log https://app.netlify.com/projects/academic-demo/deploys/6a537b33790a8f00084a8612

@Vidminas

Copy link
Copy Markdown
Author

Builds fail due to Hugo 0.162.0 incompatibility, which is addressed in #3329

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant