From 05e4f4229100e0420316072fda9e8ddc6229db5f Mon Sep 17 00:00:00 2001
From: Justin <127172022+jl33-ai@users.noreply.github.com>
Date: Wed, 17 Sep 2025 16:32:25 +0000
Subject: [PATCH] docs: update nav for cloudflare pages (#2130)
---
quartz/plugins/emitters/cname.ts | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/quartz/plugins/emitters/cname.ts b/quartz/plugins/emitters/cname.ts
index cbed2a8..0209d9a 100644
--- a/quartz/plugins/emitters/cname.ts
+++ b/quartz/plugins/emitters/cname.ts
@@ -1,8 +1,7 @@
import { FilePath, joinSegments } from "../../util/path"
import { QuartzEmitterPlugin } from "../types"
import fs from "fs"
-import chalk from "chalk"
-import DepGraph from "../../depgraph"
+import { styleText } from "util"
export function extractDomainFromBaseUrl(baseUrl: string) {
const url = new URL(`https://${baseUrl}`)
@@ -11,15 +10,11 @@
export const CNAME: QuartzEmitterPlugin = () => ({
name: "CNAME",
- getQuartzComponents() {
- return []
- },
- async getDependencyGraph(_ctx, _content, _resources) {
- return new DepGraph<FilePath>()
- },
- async emit({ argv, cfg }, _content, _resources): 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")
@@ -27,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