From 91059843ae9122bd547ddfdfa5a30edd99a42ff7 Mon Sep 17 00:00:00 2001
From: reagenzn <aiooksa929@gmail.com>
Date: Fri, 01 Aug 2025 15:57:32 +0000
Subject: [PATCH] fix(search): prevent Enter key handling during IME composition (#2070)

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

diff --git a/quartz/plugins/emitters/cname.ts b/quartz/plugins/emitters/cname.ts
index ffe2c6d..0209d9a 100644
--- a/quartz/plugins/emitters/cname.ts
+++ b/quartz/plugins/emitters/cname.ts
@@ -1,7 +1,7 @@
 import { FilePath, joinSegments } from "../../util/path"
 import { QuartzEmitterPlugin } from "../types"
 import fs from "fs"
-import chalk from "chalk"
+import { styleText } from "util"
 
 export function extractDomainFromBaseUrl(baseUrl: string) {
   const url = new URL(`https://${baseUrl}`)
@@ -10,12 +10,11 @@
 
 export const CNAME: QuartzEmitterPlugin = () => ({
   name: "CNAME",
-  getQuartzComponents() {
-    return []
-  },
-  async emit({ argv, cfg }, _content, _resources, _emit): Promise<FilePath[]> {
+  async emit({ argv, cfg }) {
     if (!cfg.configuration.baseUrl) {
-      console.warn(chalk.yellow("CNAME emitter requires `baseUrl` to be set in your configuration"))
+      console.warn(
+        styleText("yellow", "CNAME emitter requires `baseUrl` to be set in your configuration"),
+      )
       return []
     }
     const path = joinSegments(argv.output, "CNAME")
@@ -23,7 +22,8 @@
     if (!content) {
       return []
     }
-    fs.writeFileSync(path, content)
+    await fs.promises.writeFile(path, content)
     return [path] as FilePath[]
   },
+  async *partialEmit() {},
 })

--
Gitblit v1.10.0