lewisdale.dev/config/utils.js
Lewis Dale e0c315d837
Some checks failed
Build and copy to prod / build-and-copy (push) Has been cancelled
Upgrade to Eleventy 3.0.0
2024-10-06 12:36:54 +01:00

13 lines
255 B
JavaScript

import slugify from 'slugify';
/** Converts string to a slug form. */
export const slugifyString = str => {
return slugify(str, {
replacement: '-',
remove: /[#,&,+()$~%.'":*?<>{}]/g,
lower: true
});
};
export default {
slugifyString
}