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) {
|
if (item.isJob) {
|
||||||
title = item.title + ' \\ ' + item.company + ' \\ ' + `${item.location || ''}${item.location && item.remote ? ' or ' : ''}${item.remote ? 'Remote' : ''}`
|
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 `
|
return `
|
||||||
<item>
|
<item>
|
||||||
<guid>${guid}</guid>
|
<guid>${guid}</guid>
|
||||||
@ -31,6 +32,7 @@ const generateRssItem = (item) => {
|
|||||||
<comments>${guid}</comments>
|
<comments>${guid}</comments>
|
||||||
<description><![CDATA[<a href="${guid}">Comments</a>]]></description>
|
<description><![CDATA[<a href="${guid}">Comments</a>]]></description>
|
||||||
<pubDate>${new Date(item.createdAt).toUTCString()}</pubDate>
|
<pubDate>${new Date(item.createdAt).toUTCString()}</pubDate>
|
||||||
|
${category}
|
||||||
<atom:author><atom:name>${item.user.name}</atom:name></atom:author>
|
<atom:author><atom:name>${item.user.name}</atom:name></atom:author>
|
||||||
</item>
|
</item>
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user