updates and fixes

* seo friendly urls
* custom client serve-static module
* database fixes
* fix recent pages
* other fixes
This commit is contained in:
Philipinho
2024-05-18 03:19:42 +01:00
parent eefe63d1cd
commit 9c7c2f1163
102 changed files with 921 additions and 536 deletions

View File

@ -0,0 +1,15 @@
import slugify from "@sindresorhus/slugify";
export const buildPageSlug = (
pageShortId: string,
pageTitle?: string,
): string => {
const titleSlug = slugify(pageTitle?.substring(0, 99) || "untitled", {
customReplacements: [
["♥", ""],
["🦄", ""],
],
});
return `/p/${pageShortId}/${titleSlug}`;
};