mirror of
https://github.com/alrayyes/wiki.git
synced 2025-04-30 06:14:13 +00:00
base path refactor, more docs
This commit is contained in:
parent
08f8e3b4a4
commit
906f91f8ee
37 changed files with 1861 additions and 156 deletions
quartz/plugins
|
@ -3,6 +3,7 @@ import { StaticResources } from "../resources"
|
|||
import { ProcessedContent } from "./vfile"
|
||||
import { GlobalConfiguration } from "../cfg"
|
||||
import { QuartzComponent } from "../components/types"
|
||||
import { FilePath, ServerSlug } from "../path"
|
||||
|
||||
export interface PluginTypes {
|
||||
transformers: QuartzTransformerPluginInstance[],
|
||||
|
@ -29,14 +30,14 @@ export type QuartzFilterPluginInstance = {
|
|||
export type QuartzEmitterPlugin<Options extends OptionType = undefined> = (opts?: Options) => QuartzEmitterPluginInstance
|
||||
export type QuartzEmitterPluginInstance = {
|
||||
name: string
|
||||
emit(contentDir: string, cfg: GlobalConfiguration, content: ProcessedContent[], resources: StaticResources, emitCallback: EmitCallback): Promise<string[]>
|
||||
emit(contentDir: string, cfg: GlobalConfiguration, content: ProcessedContent[], resources: StaticResources, emitCallback: EmitCallback): Promise<FilePath[]>
|
||||
getQuartzComponents(): QuartzComponent[]
|
||||
}
|
||||
|
||||
export interface EmitOptions {
|
||||
slug: string
|
||||
slug: ServerSlug
|
||||
ext: `.${string}` | ""
|
||||
content: string
|
||||
}
|
||||
|
||||
export type EmitCallback = (data: EmitOptions) => Promise<string>
|
||||
export type EmitCallback = (data: EmitOptions) => Promise<FilePath>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue