fix(index): 🎨 fix TOC, add Nunito font
This commit is contained in:
parent
d81008b119
commit
06d90b6413
8 changed files with 23 additions and 35 deletions
|
@ -5,6 +5,14 @@ export function cn(...inputs: ClassValue[]) {
|
|||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export function formatDate(date: Date) {
|
||||
return Intl.DateTimeFormat("en-SE", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
}).format(date);
|
||||
}
|
||||
|
||||
export function readingTime(html: string) {
|
||||
const textOnly = html.replace(/<[^>]+>/g, "");
|
||||
const wordCount = textOnly.split(/\s+/).length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue