Display author avatars in the blog#1915
Merged
bjohansebas merged 8 commits intoexpressjs:gh-pagesfrom May 29, 2025
Merged
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
wesleytodd
approved these changes
May 27, 2025
bjohansebas
reviewed
May 28, 2025
bjohansebas
reviewed
May 28, 2025
| authors: | ||
| - name: Wes Todd | ||
| github: wesleytodd | ||
| - name: Express Technical Committee |
Member
There was a problem hiding this comment.
We could use the GitHub username for the TC, so it doesn't end up without a photo.
Contributor
Author
There was a problem hiding this comment.
I couldn't find a GitHub user for the technical committee specifically, I added expressjs and it looks like this:
Is this what you meant? If not I can revert. One doubt I had is that we're kind of spamming the blog page with lots of the same image and link out to the GitHub org. Maybe this is fine?
ShubhamOulkar
approved these changes
May 28, 2025
ShubhamOulkar
requested changes
May 28, 2025
Member
ShubhamOulkar
left a comment
There was a problem hiding this comment.
Accessibility improvements
ShubhamOulkar
approved these changes
May 29, 2025
This requires us to update the `author` front-matter, requiring it to be an array of objects instead of a single string. This paves the way for us to include further author metadata. For now we only add "name" which expects a string.
This adds the ability for authors to add their GitHub username to the blog posts they author. If they provide this then their name will be linked to their GitHub profile page.
This adds a small profile image to author lines that have a GitHub.
The authors looked a little bunched up, a left margin on each of them reads a little better. Co-Authored-By: Wes Todd <wesleytodd@users.noreply.github.com>
Co-Authored-By: Sebastian Beltran <bjohansebas@users.noreply.github.com>
Co-Authored-By: Sebastian Beltran <bjohansebas@users.noreply.github.com>
This ensures we still display a circle if, for some reason, the image that we get isn't a perfect square. Co-Authored-By: Shubham Oulkar <ShubhamOulkar@users.noreply.github.com>
Member
|
thanks @rowanmanning! |
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.

This resolves #1758 by adding author images to blog posts, both on the post page and in the list view. It's not overly designed - I went for a simple solution for now that can be expanded on later if the site is refreshed (as suggested in #1787).
This required some foundational work to ensure that:
I outlined this work in more detail in this comment on the original issue.
Screenshots
Overview page with single author:
Overview page with one author with an avatar and one without:
Overview page with two authors:
Light mode:
Blog post page: