Skip to content

Show the author's image in the blog #1758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bjohansebas opened this issue Feb 4, 2025 · 6 comments
Open

Show the author's image in the blog #1758

bjohansebas opened this issue Feb 4, 2025 · 6 comments
Labels
design Change, update, or fix for site UI (not content) enhancement help wanted

Comments

@bjohansebas
Copy link
Member

As the title says, it would be great to display the author's GitHub profile picture.

@bjohansebas bjohansebas added design Change, update, or fix for site UI (not content) enhancement help wanted labels Feb 4, 2025
@rowanmanning
Copy link
Contributor

rowanmanning commented Apr 15, 2025

Related to this, when working on RSS I noticed that we have some posts with multiple authors (example). I wonder whether we should decide on a common format for author front-matter to allow for:

  • Multiple authors
  • Extra metadata, e.g. a URL, avatar URL, etc

Something along the lines of:

authors:
  - name: Ulises Gascón
    url: https://ulisesgascon.com/
  - name: Express Technical Committee

We could go one further and require authors to be defined in Jekyll data then referenced by ID or something (example), but this might be an annoying maintenance burden.

@ShubhamOulkar
Copy link
Member

Hi @rowanmanning, thank you for your suggestions. I think it is better to add github username in front matter then generate images in blog layout.

@bjohansebas
Copy link
Member Author

I see much more value in using the name rather than the username in the blog (either because most blog posts are from the TC, or for aesthetic reasons), although we could still reference the author by username to fetch the image, like in the example @rowanmanning showed.

@rowanmanning
Copy link
Contributor

rowanmanning commented Apr 22, 2025

Thanks both for your feedback. If you're happy for me to work then I could start with the following, it'd be easy to move into _data in future if copy/pasting author info becomes a burden.

Post frontmatter

Single author, will display as an unlinked name only

authors:
  - name: Example Author

Multiple authors, will display as unlinked names delimited by , and and:

authors:
  - name: Example Author 1
  - name: Example Author 2

Authors with names and GitHub usernames, will display with a link to their GitHub profile. We'll also use https://github.com/<username>.png as an image to display next to their name. I'll design this in-browser and share screenshots if I work on this:

authors:
  - name: Example Author 1
    github: exampleuser1
  - name: Example Author 2
    github: exampleuser2

Authors with GitHub usernames only, will display with a link to their GitHub profile with @<username> as text. We'll also use https://github.com/<username>.png as an image to display next to their name:

authors:
  - github: exampleuser1
  - github: exampleuser2

If I were an author I'd also prefer to link to my website. Up to you, but it'd be relatively easy to also support a website property. I'm gonna say the order of preference for the link would be: Prefer website, if not present but github is then use their GitHub profile URL, if neither are present then do not link.

Docs

The editing guidelines would need to change, I'm happy to write this up and outline the various options. I'd also update the existing posts to use the new format.

Testing

Maybe it's out of scope for this, but it should be possible to add a step to fail the GitHub Pages build if the author frontmatter is malformed. I'll leave it out for now but could open an issue if you think it'd be valuable.

@bjohansebas
Copy link
Member Author

Sorry for the delay, @rowanmanning do you want to open a PR?

@rowanmanning
Copy link
Contributor

No problem, yep I'm happy to do the work if you're happy with that 👍 just didn't want to go ahead if you had a different direction in mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Change, update, or fix for site UI (not content) enhancement help wanted
Projects
None yet
Development

No branches or pull requests

3 participants