From e1e1d5223ea2b3455efb0b91288344705d0850f6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 27 Jan 2022 13:23:46 -0500 Subject: [PATCH] feat: push the theme name into body class --- src/middleware/helpers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/middleware/helpers.js b/src/middleware/helpers.js index bbf766895f..b4b6fdb188 100644 --- a/src/middleware/helpers.js +++ b/src/middleware/helpers.js @@ -4,6 +4,8 @@ const winston = require('winston'); const validator = require('validator'); const slugify = require('../slugify'); +const meta = require('../meta'); + const helpers = module.exports; helpers.try = function (middleware) { @@ -54,6 +56,8 @@ helpers.buildBodyClass = function (req, res, templateData = {}) { parts.push(`page-status-${res.statusCode}`); + parts.push(`theme-${meta.config['theme:id'].split('-')[2]}`); + if (req.loggedIn) { parts.push('user-loggedin'); } else {