From 589553883a250b385d60c07599fa0d4fa9104945 Mon Sep 17 00:00:00 2001 From: Michael Rausch Date: Thu, 16 Jan 2025 00:57:44 +1300 Subject: [PATCH] Added work portfolio --- src/content/projects/quickview/index.mdx | 2 +- src/lib/utils.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/projects/quickview/index.mdx b/src/content/projects/quickview/index.mdx index ca77fc2..2a89e14 100644 --- a/src/content/projects/quickview/index.mdx +++ b/src/content/projects/quickview/index.mdx @@ -4,7 +4,7 @@ description: "An AR cloud content management system" date: "2024" demoURL: "/quickviewdemo" --- -import { Tweet, Vimeo, YouTube } from 'astro-embed'; +import { Tweet, Vimeo, YouTube, LinkPreview } from 'astro-embed'; import DevIcon from 'devicons-astro'; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 5df6b9e..8b95a7b 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -14,6 +14,7 @@ export function formatDate(date: Date) { } export function readingTime(html: string) { + if (!html) return "1 min read"; const textOnly = html.replace(/<[^>]+>/g, ""); const wordCount = textOnly.split(/\s+/).length; const readingTimeMinutes = ((wordCount / 200) + 1).toFixed();