Merge remote-tracking branch 'refs/remotes/origin/master' into chat-permission

This commit is contained in:
Baris Usakli
2017-12-20 13:13:10 -05:00
10 changed files with 131 additions and 56 deletions

View File

@@ -199,14 +199,17 @@ function addTags(categoryData, res) {
}
res.locals.linkTags = [
{
rel: 'alternate',
type: 'application/rss+xml',
href: categoryData.rssFeedUrl,
},
{
rel: 'up',
href: nconf.get('url'),
},
];
if (!categoryData['feeds:disableRSS']) {
res.locals.linkTags.push({
rel: 'alternate',
type: 'application/rss+xml',
href: categoryData.rssFeedUrl,
});
}
}

View File

@@ -257,17 +257,20 @@ function addTags(topicData, req, res) {
addOGImageTags(res, topicData, postAtIndex);
res.locals.linkTags = [
{
rel: 'alternate',
type: 'application/rss+xml',
href: topicData.rssFeedUrl,
},
{
rel: 'canonical',
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) {
res.locals.linkTags.push({
rel: 'up',