Ghost/core/frontend/helpers/concat.js
Hannah Wolfe 8c03c3a0df New {{concat}} helper
- allows for concatenating strings using helpers and variables like {{concat (url) "?query=" slug}}
2019-08-05 12:12:05 +01:00

9 lines
223 B
JavaScript

const {SafeString} = require('./proxy');
module.exports = function concat(...args) {
const options = args.pop();
const separator = options.hash.separator || '';
return new SafeString(args.join(separator));
};