feat: add feeds for the blog and vulnerabilities (#1867)

This adds two new feeds to the site: `feed.xml` includes all blog posts,
and `vulnerabilities.xml` includes all posts tagged with
`vulnerabilities`.

Resolves #1763

---------

Co-authored-by: Sebastian Beltran <bjohansebas@gmail.com>
This commit is contained in:
Rowan Manning
2025-04-15 04:10:04 +01:00
committed by GitHub
parent cae37bd7bc
commit 3b8f190f0c
10 changed files with 54 additions and 5 deletions

17
_includes/feed-entry.xml Normal file
View File

@@ -0,0 +1,17 @@
{%- assign entry = include.entry -%}
<entry>
<id>{{ site.url }}{{ entry.url }}</id>
<link href="{{ site.url }}{{ entry.url }}" rel="alternate" type="text/html" />
<title type="text">{{ entry.title }}</title>
{%- if entry.author %}
<author>
<name>{{ entry.author }}</name>
</author>
{%- endif %}
<published>{{ entry.date | date_to_xmlschema }}</published>
<updated>{{ entry.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
{%- for tag in post.tags %}
<category term="{{ tag | xml_escape }}" />
{%- endfor %}
<content type="html"><![CDATA[ <a href="{{ site.url }}{{ entry.url }}">Read {{ entry.title }}</a> ]]></content>
</entry>

View File

@@ -47,4 +47,6 @@
<script data-cfasync="false" defer src="/js/menu.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="alternate" type="application/atom+xml" href="/feed.xml" title="Express Blog" />
<link rel="alternate" type="application/atom+xml" href="/vulnerabilities.xml" title="Express Vulnerabilities" />
</head>

10
_layouts/feed.xml Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">{{ page.title }}</title>
<link href="{{ site.url }}{{ page.html_url }}" rel="alternate" type="text/html" />
<link href="{{ site.url }}{{ page.url }}" rel="self" type="application/atom+xml" />
<id>{{ site.url }}{{ page.url }}</id>
<rights>Copyright The Express Contributors</rights>
<updated>{{ site.time | date_to_xmlschema }}</updated>
{{ content }}
</feed>

View File

@@ -1,7 +1,7 @@
---
title: September 2024 Security Releases
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.
tags: security, vulnerabilities
tags: security vulnerabilities
author: Ulises Gascón
---

View File

@@ -1,7 +1,7 @@
---
title: Express Never Ending Support Launched by HeroDevs and Express.js
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.
tags: partnerships, announcements
tags: partnerships announcements
author: Express Technical Committee
---

View File

@@ -1,6 +1,6 @@
---
title: "Express.js Security Audit: A Milestone Achievement"
tags: security, audit, releases
tags: security audit releases
author: Express Technical Committee
description: Celebrating the successful completion of the Express.js security audit conducted by Ada Logics and facilitated by OSTIF.
---

View File

@@ -1,6 +1,6 @@
---
title: "A New Chapter for Express.js: Triumphs of 2024 and an ambitious 2025"
tags: news, rewind, 2024
tags: news rewind 2024
author: Express Technical Committee
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.
---

View File

@@ -1,6 +1,6 @@
---
title: "Express@5.1.0: Now the Default on npm with LTS Timeline"
tags: news, release
tags: news release
author: Express Technical Committee
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.
---

10
feed.xml Normal file
View File

@@ -0,0 +1,10 @@
---
layout: feed
sitemap: false
title: Express Blog
html_url: /en/blog/posts.html
---
{% assign posts = site.posts | sort: "date" | reverse %}
{% for post in posts %}
{% include feed-entry.xml entry=post %}
{% endfor %}

10
vulnerabilities.xml Normal file
View File

@@ -0,0 +1,10 @@
---
layout: feed
sitemap: false
title: Express Vulnerabilities
html_url: /en/blog/posts.html
---
{% assign posts = site.posts | sort: "date" | reverse %}
{% for post in posts %}
{% if post.tags contains "vulnerabilities" %}{% include feed-entry.xml entry=post %}{% endif %}
{% endfor %}