Add category tag to RSS feed (#534)
Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
parent
65fa3cf966
commit
c0c691eda5
|
@ -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>
|
||||
|
@ -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>
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue