mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
fix: missing postAtIndex handling
This commit is contained in:
@@ -249,10 +249,6 @@ async function addTags(topicData, req, res) {
|
|||||||
rel: 'canonical',
|
rel: 'canonical',
|
||||||
href: `${url}/topic/${topicData.slug}`,
|
href: `${url}/topic/${topicData.slug}`,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
rel: 'author',
|
|
||||||
href: `${url}/user/${postAtIndex.user.userslug}`,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!topicData['feeds:disableRSS']) {
|
if (!topicData['feeds:disableRSS']) {
|
||||||
@@ -269,6 +265,13 @@ async function addTags(topicData, req, res) {
|
|||||||
href: `${url}/category/${topicData.category.slug}`,
|
href: `${url}/category/${topicData.category.slug}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (postAtIndex) {
|
||||||
|
res.locals.linkTags.push({
|
||||||
|
rel: 'author',
|
||||||
|
href: `${url}/user/${postAtIndex.user.userslug}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addOGImageTags(res, topicData, postAtIndex) {
|
async function addOGImageTags(res, topicData, postAtIndex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user