macos-defaults/build/handlebars-helpers.js
2022-08-19 16:10:36 +02:00

10 lines
274 B
JavaScript

const Handlebars = require('handlebars')
const slugify = require('slugify')
Handlebars.registerHelper('metaTag', (string) => {
return JSON.stringify(string.replace(/"/g, '"'))
})
Handlebars.registerHelper('slugify', (string) =>
slugify(string, { lower: true })
)