Move template management to settings (#5811)

This commit is contained in:
Tom Moor
2023-09-10 15:46:12 -04:00
committed by GitHub
parent ac068c0c07
commit 0856f5f6ae
32 changed files with 432 additions and 267 deletions

16
shared/utils/slugify.ts Normal file
View File

@@ -0,0 +1,16 @@
import slug from "slug";
slug.defaults.mode = "rfc3986";
/**
* Convert a string to a slug that can be used in a URL in kebab-case format,
* and remove periods.
*
* @param text The text to convert
* @returns The slugified text
*/
export default function slugify(text: string): string {
return slug(text, {
remove: /[.]/g,
});
}