UNPKG

@rr0/cms

Version:

RR0 Content Management System (CMS)

29 lines (28 loc) 1.35 kB
import { ContentStep, ContentStepConfig, ContentStepResult, OutputFunc } from "ssg-api"; import { HtmlRR0Context } from "./RR0Context.js"; import { TimeService } from "./time/index.js"; export interface ContentVisitor { visit(context: HtmlRR0Context): Promise<void>; } export interface FileVisitor { visit(context: HtmlRR0Context, processFile: boolean): Promise<void>; contentStepEnd(): Promise<void>; } export interface RR0ContentStepOptions { contentConfigs: ContentStepConfig[]; outputFunc: OutputFunc; fileVisitors?: FileVisitor[]; contentVisitors?: ContentVisitor[]; force: boolean; name: string; toProcess: Set<string>; } export declare class RR0ContentStep extends ContentStep<HtmlRR0Context> { protected options: RR0ContentStepOptions; protected timeService: TimeService; constructor(options: RR0ContentStepOptions, timeService: TimeService); protected processFile(context: HtmlRR0Context, filePath: string, contentsConfig: ContentStepConfig): Promise<string | undefined>; protected shouldProcessFile(context: HtmlRR0Context, contentsConfig: ContentStepConfig): Promise<boolean>; protected shouldProcessContent(context: HtmlRR0Context, contentsConfig: ContentStepConfig): Promise<boolean>; protected postExecute(result: ContentStepResult): Promise<ContentStepResult>; }