From d9159e0ac9bfc22e584c78bc8aa04ecd82c14eea Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 13 Mar 2025 17:27:46 +0000
Subject: [PATCH] feat: make og images an emitter to properly await image generation (#1826)

---
 quartz/plugins/emitters/cname.ts |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/quartz/plugins/emitters/cname.ts b/quartz/plugins/emitters/cname.ts
index 380212d..897d851 100644
--- a/quartz/plugins/emitters/cname.ts
+++ b/quartz/plugins/emitters/cname.ts
@@ -14,7 +14,7 @@
   async getDependencyGraph(_ctx, _content, _resources) {
     return new DepGraph<FilePath>()
   },
-  async emit({ argv, cfg }, _content, _resources): Promise<FilePath[]> {
+  async emit({ argv, cfg }, _content, _resources) {
     if (!cfg.configuration.baseUrl) {
       console.warn(chalk.yellow("CNAME emitter requires `baseUrl` to be set in your configuration"))
       return []
@@ -24,7 +24,7 @@
     if (!content) {
       return []
     }
-    fs.writeFileSync(path, content)
+    await fs.promises.writeFile(path, content)
     return [path] as FilePath[]
   },
 })

--
Gitblit v1.10.0