mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 13:26:22 +00:00
26 lines
483 B
TypeScript
26 lines
483 B
TypeScript
|
import { QuartzEmitterPlugin } from "../types"
|
||
|
|
||
|
interface Options {
|
||
|
domain: string
|
||
|
}
|
||
|
|
||
|
export const CNAME: QuartzEmitterPlugin<Options> = (opts?: Options) => ({
|
||
|
name: "CNAME",
|
||
|
getQuartzComponents() {
|
||
|
return []
|
||
|
},
|
||
|
async emit(_contentFolder, _cfg, _content, _resources, emit): Promise<string[]> {
|
||
|
const slug = "CNAME"
|
||
|
|
||
|
if (opts?.domain) {
|
||
|
await emit({
|
||
|
content: opts?.domain,
|
||
|
slug,
|
||
|
ext: "",
|
||
|
})
|
||
|
}
|
||
|
|
||
|
return ["CNAME"]
|
||
|
}
|
||
|
})
|