mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-20 23:02:13 +00:00
modern toc tweaks
This commit is contained in:
parent
9d2024b11c
commit
917d5791ac
17 changed files with 318 additions and 58 deletions
quartz/plugins/emitters
25
quartz/plugins/emitters/cname.ts
Normal file
25
quartz/plugins/emitters/cname.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
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"]
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue