mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-09 14:10:40 +01:00
@@ -13,9 +13,6 @@ categoriesController.list = function (req, res, next) {
|
||||
res.locals.metaTags = [{
|
||||
name: 'title',
|
||||
content: String(meta.config.title || 'NodeBB'),
|
||||
}, {
|
||||
property: 'og:title',
|
||||
content: '[[pages:categories]]',
|
||||
}, {
|
||||
property: 'og:type',
|
||||
content: 'website',
|
||||
@@ -42,6 +39,10 @@ categoriesController.list = function (req, res, next) {
|
||||
|
||||
if (req.originalUrl.startsWith(nconf.get('relative_path') + '/api/categories') || req.originalUrl.startsWith(nconf.get('relative_path') + '/categories')) {
|
||||
data.breadcrumbs = helpers.buildBreadcrumbs([{ text: data.title }]);
|
||||
res.locals.metaTags.push({
|
||||
property: 'og:title',
|
||||
content: '[[pages:categories]]',
|
||||
});
|
||||
}
|
||||
|
||||
data.categories.forEach(function (category) {
|
||||
|
||||
@@ -124,7 +124,7 @@ Tags.parse = function (req, data, meta, link, callback) {
|
||||
|
||||
addIfNotExists(meta, 'property', 'og:title', Meta.config.title || 'NodeBB');
|
||||
|
||||
var ogUrl = nconf.get('url') + req.path;
|
||||
var ogUrl = nconf.get('url') + (req.originalUrl !== '/' ? req.originalUrl : '');
|
||||
addIfNotExists(meta, 'property', 'og:url', ogUrl);
|
||||
|
||||
addIfNotExists(meta, 'name', 'description', Meta.config.description);
|
||||
|
||||
Reference in New Issue
Block a user