cncf / cncf.io

☁️♮🏛🚧 The CNCF.io WordPress website
https://cncf.io
MIT License
82 stars 37 forks source link

Pull in photo of author for blog post based on People lookup #566

Open cjyabraham opened 2 years ago

cjyabraham commented 2 years ago

With the new site design, we have the ability to show an image of blog post author, like here.

Normally this image needs to be assigned to each post, however, if it's not assigned, we could try and match the first+last names of the author with data in our People CPT (staff, TOC members, GB members, Ambassadors, etc.) and use the image from that person if there's a match.

This would backfill all existing blog posts with a lot of images showing up when there are currently none and would make it easier for blog editors going forward, since this is now automated for a lot of our key people. One concern, however, is that we match on the wrong person with the same name (eg. "John Smith"). Perhaps we'd need a switch to turn off the image when we really don't want one.