Skip to content

Commit

Permalink
Add category tag to RSS feed (#534)
Browse files Browse the repository at this point in the history
Co-authored-by: ekzyis <[email protected]>
  • Loading branch information
ekzyis and ekzyis authored Oct 3, 2023
1 parent 65fa3cf commit c0c691e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rss.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const generateRssItem = (item) => {
if (item.isJob) {
title = item.title + ' \\ ' + item.company + ' \\ ' + `${item.location || ''}${item.location && item.remote ? ' or ' : ''}${item.remote ? 'Remote' : ''}`
}
const category = item.subName ? `<category domain="${SITE_URL}/~${item.subName}">${item.subName}</category>` : '<category></category>'
return `
<item>
<guid>${guid}</guid>
Expand All @@ -31,6 +32,7 @@ const generateRssItem = (item) => {
<comments>${guid}</comments>
<description><![CDATA[<a href="${guid}">Comments</a>]]></description>
<pubDate>${new Date(item.createdAt).toUTCString()}</pubDate>
${category}
<atom:author><atom:name>${item.user.name}</atom:name></atom:author>
</item>
`
Expand Down

0 comments on commit c0c691e

Please sign in to comment.