Skip to content

Node.js based forum software built for the modern web

closes #5434

barisusakli8b006fb1ab74
diff --git a/src/meta/tags.js b/src/meta/tags.js
index f7e349f353..0cd680a70a 100644
--- a/src/meta/tags.js
+++ b/src/meta/tags.js
@@ -28,18 +28,27 @@ module.exports = function (Meta) {
}, {
property: 'og:site_name',
content: Meta.config.title || 'NodeBB'
- }, {
- name: 'keywords',
- content: Meta.config.keywords || ''
}, {
name: 'msapplication-badge',
content: 'frequency=30; polling-uri=' + nconf.get('url') + '/sitemap.xml',
noEscape: true
- }, {
- name: 'msapplication-square150x150logo',
- content: Meta.config['brand:logo'] || '',
- noEscape: true
}];
+
+ if (Meta.config.keywords) {
+ defaultTags.push({
+ name: 'keywords',
+ content: Meta.config.keywords
+ });
+ }
+
+ if (Meta.config['brand:logo']) {
+ defaultTags.push({
+ name: 'msapplication-square150x150logo',
+ content: Meta.config['brand:logo'],
+ noEscape: true
+ });
+ }
+
plugins.fireHook('filter:meta.getMetaTags', defaultTags, next);
},
links: function (next) {