-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39513 from mtardy/cve-feed-rss
CVE feed: add RSS feed format
- Loading branch information
Showing
2 changed files
with
43 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{ $feed := getJSON .Site.Params.cveFeedBucket -}} | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
<channel> | ||
<title>{{ $feed.title }}</title> | ||
<link>{{ .Site.BaseURL }}docs/reference/issues-security/official-cve-feed/</link> | ||
<description>{{ $feed.description }}</description> | ||
<generator>Hugo -- gohugo.io</generator> | ||
<language>en-US</language> | ||
<copyright>{{ .Site.Params.Copyright_k8s }}</copyright> | ||
<lastBuildDate>{{ time.Format "Mon, 02 Jan 2006 15:04:05 -0700" $feed._kubernetes_io.updated_at | safeHTML }}</lastBuildDate> | ||
{{ with .OutputFormats.Get "RSS" -}} | ||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} | ||
{{ end -}} | ||
{{ range $feed.items -}} | ||
<item> | ||
<title>{{ .id }}</title> | ||
<link>{{ .url }}</link> | ||
<pubDate>{{ time.Format "Mon, 02 Jan 2006 15:04:05 -0700" .date_published | safeHTML }}</pubDate> | ||
<guid>{{ .external_url }}</guid> | ||
<description>{{ htmlEscape .summary }}</description> | ||
</item> | ||
{{ end -}} | ||
</channel> | ||
</rss> | ||
|