feat: programmatically generate open graph cards
This commit is contained in:
parent
e34ad2cb0e
commit
0b47dc7747
15 changed files with 144 additions and 35 deletions
13
config/utils/index.js
Normal file
13
config/utils/index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const slugify = require('slugify')
|
||||
|
||||
const slugifyString = (str) => {
|
||||
return slugify(str, {
|
||||
replacement: '-',
|
||||
remove: /[#,&,+()$~%.'":*?<>{}]/g,
|
||||
lower: true,
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
slugifyString,
|
||||
}
|
Reference in a new issue