the horrors
This commit is contained in:
parent
0d9be3d002
commit
4245370f61
48 changed files with 2513 additions and 265 deletions
17
src/lib/metadata.ts
Normal file
17
src/lib/metadata.ts
Normal 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()}`;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue