the horrors

This commit is contained in:
Laker Turner 2025-03-17 12:49:54 +00:00
parent 0d9be3d002
commit 4245370f61
No known key found for this signature in database
48 changed files with 2513 additions and 265 deletions

17
src/lib/metadata.ts Normal file
View file

@ -0,0 +1,17 @@
import conf from "~/site.config";
// todo: add blog detection
export const titleConstructor = (title: string) => {
if (!title) return conf.siteName;
return `${title} | ${conf.siteName}`;
};
export const descriptionConstructor = (description: string) => {
if (!description) return conf.description;
return `${description}`;
};
export const noteTitleConstructor = (title: string, date: Date) => {
if (title) return title;
return `A note from ${date.toLocaleDateString()}`;
};