• How to set meta tag in plugin ?
    <meta name="tags" content="abc, def" />

  • NodeBB

    Starting with 1.6.0 you can use plugins.fireHook('filter:meta.getMetaTags', { req: req, data: data, defaultTags: defaultTags }, next);

    If you want to do it on 1.5.2 you can try the below using the the hook filter:topic.build.

    myPluign.onTopicBuild = function (hookData, callback) {
        hookData.res.locals.metaTags.push({  property: 'tags', content: 'abc, def' });
        callback(null, hookData);

Suggested Topics

| |