inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.12k stars 102 forks source link

Highlight one or more authors #361

Open JulioAzcarate opened 1 week ago

JulioAzcarate commented 1 week ago

It would be very useful to have an option to highlight one or more authors in the list of publications.

PS: sorry, I didn't find how to tag this comment as inprove or suggestion.

inukshuk commented 1 week ago

Good idea!

The first approach that comes to mind is to do this by using a bibliography template. In the template you have access to the rendered reference string as well as to the all the entry's individual fields. This means you could, for example, check the entry's authors to see if the author you want to highlight is is present, and if so use a regular expression to wrap the first occurrence of the author in the reference string.