mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-12-14 21:52:33 +00:00
32cf426956
Currently, page url generation (slugification) is just toLowerCase. In https://github.com/yannbertrand/macos-defaults/pull/146 I add some defaults that contain keys with spaces, which currently breaks. This pulls in `slugify` to add support, and shell escapes keys in examples.
8 lines
No EOL
233 B
JavaScript
8 lines
No EOL
233 B
JavaScript
const Handlebars = require('handlebars')
|
|
const slugify = require('slugify')
|
|
|
|
Handlebars.registerHelper('metaTag', (string) => {
|
|
return JSON.stringify(string.replace(/"/g, '"'))
|
|
})
|
|
|
|
Handlebars.registerHelper('slugify', slugify) |