feat(authors): add a per-author name-highlight flag (owner by default)#3343
Open
Vidminas wants to merge 1 commit into
Open
feat(authors): add a per-author name-highlight flag (owner by default)#3343Vidminas wants to merge 1 commit into
Vidminas wants to merge 1 commit into
Conversation
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>
β Deploy Preview for academic-demo failed. Why did it fail? β
|
Author
|
Builds fail due to Hugo 0.162.0 incompatibility, which is addressed in #3329 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
page_metadata_authors already had a
$highlight_nameflag and afont-boldbranch, but it was hardcoded tofalse, so author names were never emphasised in citation/publication author lists.Add an optional per-author
highlight_namebool (surfaced by get_author_profile) that controls whether an author's name is emphasised:highlight_name: trueto highlight any author (e.g. yourself as a co-author), orfalseto opt out;is_owner(fromis_owner: true/ legacysuperuser: true), so the site owner is highlighted by default.The fallback uses
ne β¦ nilrather than| defaultso an explicithighlight_name: falseopts 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.yamlauthor file.π What type of change is this?
π― What is the purpose of this change?
page_metadata_authors.htmlalready contains a$highlight_namevariable and afont-boldrender branch β but
$highlight_nameis hardcoded tofalseand never set, so author namesare never emphasised in a citation or publication author list.
Change. Add an optional per-author
highlight_namebool (surfaced byget_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;is_owner(fromis_owner: true, or the legacysuperuser: 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; noblock- or site-level config knob is added. The fallback uses
ne β¦ nil(not| default) so anexplicit
highlight_name: falseopts the owner out rather than being read as "unset".Verified on the
academic-cvstarter (data/authors/me.yamlhasis_owner: true):font-bold(3Γ) in the homepage "RecentPublications" list, co-authors plain; on
mainnothing is bold;highlight_name: falseonme.yaml) β the owner renders plain;highlight_name: trueon a co-author's data file) β that name rendersfont-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):After β this PR (owner's name bold):
βΉοΈ Documentation Check
Documented in-branch: the field is listed in
get_author_profile.html's output contract (itsheader comment), and shown as a commented, explained example next to
is_ownerin the academic-cvme.yamlauthor file.(Only academic-cv's
me.yamlcarries 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 needhighlight_nameaddedto the author-data reference.)
π Contributor Agreement
Thank you for your contribution!