Added work portfolio

This commit is contained in:
Michael Rausch 2025-01-16 00:57:44 +13:00
parent c0c5a71b0a
commit 589553883a
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ description: "An AR cloud content management system"
date: "2024" date: "2024"
demoURL: "/quickviewdemo" demoURL: "/quickviewdemo"
--- ---
import { Tweet, Vimeo, YouTube } from 'astro-embed'; import { Tweet, Vimeo, YouTube, LinkPreview } from 'astro-embed';
import DevIcon from 'devicons-astro'; import DevIcon from 'devicons-astro';
<YouTube id="tRZPLgZB_II" /> <YouTube id="tRZPLgZB_II" />

View File

@ -14,6 +14,7 @@ export function formatDate(date: Date) {
} }
export function readingTime(html: string) { export function readingTime(html: string) {
if (!html) return "1 min read";
const textOnly = html.replace(/<[^>]+>/g, ""); const textOnly = html.replace(/<[^>]+>/g, "");
const wordCount = textOnly.split(/\s+/).length; const wordCount = textOnly.split(/\s+/).length;
const readingTimeMinutes = ((wordCount / 200) + 1).toFixed(); const readingTimeMinutes = ((wordCount / 200) + 1).toFixed();