Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d1f904a

Browse files
rowanmanningwesleytoddbjohansebasShubhamOulkar
authoredMay 29, 2025··
Display author avatars in the blog (#1915)
* feat: allow blogs to have multiple authors 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. * feat: allow linking to author GitHub profiles 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. * feat: add GitHub profile images to author lines This adds a small profile image to author lines that have a GitHub. * feat: add author URLs to the feeds * fix: space the authors a little more The authors looked a little bunched up, a left margin on each of them reads a little better. Co-Authored-By: Wes Todd <[email protected]> * fix: improve readability of the feed entry Liquid Co-Authored-By: Sebastian Beltran <[email protected]> * feat: add author image for the technical committee Co-Authored-By: Sebastian Beltran <[email protected]> * fix: set a width and height on author images 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 <[email protected]> --------- Co-authored-by: Wes Todd <[email protected]> Co-authored-by: Sebastian Beltran <[email protected]> Co-authored-by: Shubham Oulkar <[email protected]>
1 parent b460ccb commit d1f904a

16 files changed

+93
-23
lines changed
 

‎_includes/blog/authors.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{%- assign authors = include.authors -%}
2+
{% if authors %}
3+
<div class="blog-authors">
4+
By
5+
{% for author in authors %}
6+
7+
{%- assign label = author.github | prepend: '@' -%}
8+
{%- if author.name -%}
9+
{%- assign label = author.name -%}
10+
{%- endif -%}
11+
12+
{% if label and author.github %}
13+
<a href="https://github.com/{{author.github}}" rel="author" class="blog-author-link">
14+
<img src="https://github.com/{{author.github}}.png?size=64" alt="" class="blog-author-avatar" />
15+
<span class="blog-author-link-label">{{label}}</span></a>{% unless forloop.last %}, {% endunless %}
16+
{% elsif label %}
17+
{{label}}{% unless forloop.last %}, {% endunless %}
18+
{% endif %}
19+
{% endfor %}
20+
</div>
21+
{% endif %}

‎_includes/feed-entry.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
<id>{{ site.url }}{{ entry.url }}</id>
44
<link href="{{ site.url }}{{ entry.url }}" rel="alternate" type="text/html" />
55
<title type="text">{{ entry.title }}</title>
6-
{%- if entry.author %}
7-
<author>
8-
<name>{{ entry.author }}</name>
9-
</author>
10-
{%- endif %}
6+
{%- for author in entry.authors %}
7+
<author>
8+
{% if author.name %}
9+
<name>{{ author.name }}</name>
10+
{% elsif author.github %}
11+
<name>@{{ author.github }}</name>
12+
{% endif %}
13+
{% if author.github %}
14+
<uri>https://github.com/{{ author.github }}</uri>
15+
{% endif %}
16+
</author>
17+
{%- endfor %}
1118
<published>{{ entry.date | date_to_xmlschema }}</published>
1219
<updated>{{ entry.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
1320
{%- for tag in post.tags %}

‎_includes/head.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@
4040
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4141
<meta name="description" content="{{page.description}}">
4242
<meta property="og:url" content="https://expressjs.com{{page.url}}">
43-
{% if page.author %}
44-
<meta property="og:type" content="article">
45-
<meta property="og:article:author" content="{{page.author}}">
43+
{% if page.authors %}
44+
<meta property="og:type" content="article">
45+
{%- for author in page.authors %}
46+
<meta property="og:article:author" content="{{author.name}}">
47+
{%- endfor %}
4648
{% else %}
4749
<meta property="og:type" content="website">
4850
{% endif %}

‎_layouts/post.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ <h1>{{page.title}}</h1>
2121
<h2>{{page.sub_title}}</h2>
2222
{% endif %}
2323
<div class="blog-details">
24-
{% if page.author %}
25-
<div class="blog-author">By {{page.author}}</div>
26-
{% endif %}
24+
{% include blog/authors.html authors=page.authors %}
2725
<div class="blog-date">{{page.date| date: "%d %b %Y" }}</div>
2826
</div>
2927
{{ content }}

‎_posts/2024-07-16-welcome-post.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
title: Welcome to The Express Blog!
33
description: Introducing the new Express blog — a primary platform for announcements, updates, and communication from the Express technical committee.
44
tags: site-admin
5-
author: Rand McKinney and Chris Del
5+
authors:
6+
- name: Rand McKinney
7+
github: crandmck
8+
- name: Chris Del
9+
github: chrisdel101
610
---
711

812
Welcome to the new Express blog! The blog is meant to be a primary means of communication for the Express technical committee (TC). While we currently have other channels such as X, LinkedIn, and of course GitHub, there's no authoritative "soapbox" for announcements and general communication.

‎_posts/2024-09-29-security-releases.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: September 2024 Security Releases
33
description: Security releases for Express, body-parser, send, serve-static, and path-to-regexp have been published. We recommend that all users upgrade as soon as possible.
44
tags: security vulnerabilities
5-
author: Ulises Gascón
5+
authors:
6+
- name: Ulises Gascón
7+
github: UlisesGascon
68
---
79

810
Recently, the Express team has been made aware of a number of security vulnerabilities in the Express project. We have released a number of patches to address these vulnerabilities.

‎_posts/2024-10-01-HeroDevs-partnership-announcement.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: Express Never Ending Support Launched by HeroDevs and Express.js
33
description: The Express.js team is pleased to announce a partnership with HeroDevs to launch Express Never-Ending Support (NES), providing long-term support for applications built with legacy Express. This collaboration ensures that developers relying on older versions of the framework will continue to receive critical security and compatibility updates, allowing them to maintain and scale their applications securely, even after the framework's official end-of-life.
44
tags: partnerships announcements
5-
author: Express Technical Committee
5+
authors:
6+
- name: Express Technical Committee
7+
github: expressjs
68
---
79

810
The Express.js team is pleased to announce a partnership with HeroDevs to launch [Express Never-Ending Support (NES)](https://www.herodevs.com/support/express-nes), providing long-term support for applications built with legacy Express. This collaboration ensures that developers relying on older versions of the framework will continue to receive critical security and compatibility updates, allowing them to maintain and scale their applications securely, even after the framework's official end-of-life.

‎_posts/2024-10-15-v5-release.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22
title: "Introducing Express v5: A New Era for the Node.js Framework"
33
tags: releases
4-
author: Wes Todd and the Express Technical Committee
4+
authors:
5+
- name: Wes Todd
6+
github: wesleytodd
7+
- name: Express Technical Committee
8+
github: expressjs
59
description: Announcing the release of Express version 5
610
---
711

‎_posts/2024-10-22-security-audit-milestone-achievement.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: "Express.js Security Audit: A Milestone Achievement"
33
tags: security audit releases
4-
author: Express Technical Committee
4+
authors:
5+
- name: Express Technical Committee
6+
github: expressjs
57
description: Celebrating the successful completion of the Express.js security audit conducted by Ada Logics and facilitated by OSTIF.
68
---
79

‎_posts/2025-01-09-rewind-2024-triumphs-and-2025-vision.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: "A New Chapter for Express.js: Triumphs of 2024 and an ambitious 2025"
33
tags: news rewind 2024
4-
author: Express Technical Committee
4+
authors:
5+
- name: Express Technical Committee
6+
github: expressjs
57
description: Explore the transformative journey of Express.js in 2024, marked by governance improvements, the long-awaited release of Express 5.0, and heightened security measures. Look into the ambitious plans for 2025, including performance optimizations, scoped packages, and a bold roadmap for sustained growth in the Node.js ecosystem.
68
---
79

‎_posts/2025-03-31-v5-1-latest-release.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: "Express@5.1.0: Now the Default on npm with LTS Timeline"
33
tags: news release
4-
author: Express Technical Committee
4+
authors:
5+
- name: Express Technical Committee
6+
github: expressjs
57
description: Express 5.1.0 is now the default on npm, and we're introducing an official LTS schedule for the v4 and v5 release lines.
68
---
79

‎_posts/2025-05-16-express-cleanup-legacy-packages.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: "Spring Cleaning in Express.js: Deprecations and the Path Ahead"
33
tags: news
4-
author: Express Technical Committee
4+
authors:
5+
- name: Express Technical Committee
6+
github: expressjs
57
description: As part of a broader effort to modernize and streamline Express.js, we’ve deprecated several outdated packages including csurf, connect-multiparty, and path-match. Learn why we made these changes and what it means for the future of the framework.
68
---
79

‎_posts/2025-05-19-security-releases.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: May 2025 Security Releases
33
description: Security release for Multer has been published. We recommend that all users upgrade as soon as possible.
44
tags: security vulnerabilities
5-
author: Ulises Gascón
5+
authors:
6+
- name: Ulises Gascón
7+
github: UlisesGascon
68
---
79

810
The Express team has released a new major version of [Multer](https://www.npmjs.com/package/multer) addressing two high-severity security vulnerabilities. This update improves the reliability and security of handling file uploads in Express applications.

‎css/style.css

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,9 +1487,24 @@ h2 a {
14871487
max-width: 100%;
14881488
margin: auto;
14891489
}
1490-
.blog-author {
1490+
.blog-authors {
14911491
font-style: italic;
14921492
}
1493+
.blog-author-link {
1494+
color: inherit;
1495+
margin-left: 0.5ch;
1496+
text-decoration: none;
1497+
}
1498+
.blog-author-link-label {
1499+
text-decoration: underline;
1500+
}
1501+
.blog-author-avatar {
1502+
border-radius: 50%;
1503+
display: inline-block;
1504+
vertical-align: middle;
1505+
width: 1.5em;
1506+
height: 1.5em;
1507+
}
14931508
.blog-date {
14941509
font-weight: bold;
14951510
font-size: 85%;

‎en/blog/posts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Want to write a post? See the submission [guidelines.](/en/blog/write-post.html)
1717
<a href="{{ post.url }}"> {{ post.title }}</a>
1818
</div>
1919
<div class="blog-details">
20-
<div>By {{ post.author }}</div>
20+
{% include blog/authors.html authors=post.authors %}
2121
<div >{{ post.date | date:"%b %d, %Y" }}</div>
2222
</div>
2323
<div class="blog-excerpt"> {{post.excerpt | truncate: 240 | markdownify }} </div>

‎en/blog/write-post.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ Create a new file in the `_posts` directory named using following the format: `Y
3333
sub_title: <your-optional-sub-title>
3434
description: <description-of-your-post>
3535
tags: <white-space-separated-topics>
36-
author: <your-name>
36+
authors:
37+
- name: <your-name>
38+
github: <github-username>
3739
---
3840
```
41+
42+
The `github` property of an author is optional. Including your username only (not your full profile URL) will ensure that your blog post links out to it.
43+
3944
2. ### Add your content
4045
Finally, start writing your content below the front matter. Use standard markdown formatting.
4146

0 commit comments

Comments
 (0)
Please sign in to comment.