v1.18.x
barisusakli 8 years ago
parent 54c951cc81
commit 3b8d14bf12

@ -13,9 +13,6 @@ categoriesController.list = function (req, res, next) {
res.locals.metaTags = [{
name: 'title',
content: String(meta.config.title || 'NodeBB'),
}, {
name: 'description',
content: String(meta.config.description || ''),
}, {
property: 'og:title',
content: '[[pages:categories]]',
@ -24,6 +21,13 @@ categoriesController.list = function (req, res, next) {
content: 'website',
}];
if (meta.config.description) {
res.locals.metaTags.push({
name: 'description',
content: String(meta.config.description || ''),
});
}
var ogImage = meta.config['og:image'] || meta.config['brand:logo'] || '';
if (ogImage) {
if (!ogImage.startsWith('http')) {

@ -131,7 +131,7 @@ module.exports = function (Meta) {
}
});
if (!hasDescription) {
if (!hasDescription && Meta.config.description) {
meta.push({
name: 'description',
content: validator.escape(String(Meta.config.description || '')),

Loading…
Cancel
Save