mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 13:21:28 +02:00
closes #5493
This commit is contained in:
@@ -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 || '')),
|
||||
|
||||
Reference in New Issue
Block a user