mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fix rss feed on topic #6184
This commit is contained in:
@@ -257,17 +257,20 @@ function addTags(topicData, req, res) {
|
|||||||
addOGImageTags(res, topicData, postAtIndex);
|
addOGImageTags(res, topicData, postAtIndex);
|
||||||
|
|
||||||
res.locals.linkTags = [
|
res.locals.linkTags = [
|
||||||
{
|
|
||||||
rel: 'alternate',
|
|
||||||
type: 'application/rss+xml',
|
|
||||||
href: topicData.rssFeedUrl,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
rel: 'canonical',
|
rel: 'canonical',
|
||||||
href: nconf.get('url') + '/topic/' + topicData.slug,
|
href: nconf.get('url') + '/topic/' + topicData.slug,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (!topicData['feeds:disableRSS']) {
|
||||||
|
res.locals.linkTags.push({
|
||||||
|
rel: 'alternate',
|
||||||
|
type: 'application/rss+xml',
|
||||||
|
href: topicData.rssFeedUrl,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (topicData.category) {
|
if (topicData.category) {
|
||||||
res.locals.linkTags.push({
|
res.locals.linkTags.push({
|
||||||
rel: 'up',
|
rel: 'up',
|
||||||
|
|||||||
Reference in New Issue
Block a user