From 3c8ccde62431321c4ad35093a780a1585fd424dc Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 06 Mar 2025 01:21:19 +0000
Subject: [PATCH] chore(og-image): force twemoji for emoji util

---
 quartz/components/Head.tsx |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/quartz/components/Head.tsx b/quartz/components/Head.tsx
index 1aa8cbe..a1fb0f6 100644
--- a/quartz/components/Head.tsx
+++ b/quartz/components/Head.tsx
@@ -29,15 +29,12 @@
     width,
     height,
     fonts,
-    // `code` will be the detected language code, `emoji` if it's an Emoji, or `unknown` if not able to tell.
-    // `segment` will be the content to render.
-    loadAdditionalAsset: async (code: string, segment: string) => {
-      if (code === "emoji") {
-        // if segment is an emoji, load the image.
-        return `data:image/svg+xml;base64,${btoa(await loadEmoji("twemoji", getIconCode(segment)))}`
+    loadAdditionalAsset: async (languageCode: string, segment: string) => {
+      if (languageCode === "emoji") {
+        return `data:image/svg+xml;base64,${btoa(await loadEmoji(getIconCode(segment)))}`
       }
-      // if segment is normal text
-      return code
+
+      return languageCode
     },
   })
 

--
Gitblit v1.10.0