Very Popular
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158import Site from "./site.ts";import { Page } from "./filesystem.ts";
/** * The data of a page */export interface Data { tags?: string[]; url?: string | ((page: Page) => string); draft?: boolean; renderOrder?: number; content?: unknown; layout?: string; templateEngine?: string | string[]; [index: string]: unknown;}
/** * Generical helper to use in the template engines */export type Helper = (...args: unknown[]) => string | Promise<string>;
/** * The available options for template helpers */export interface HelperOptions { type: string; async?: boolean; body?: boolean;}
/** * All available event types */export type EventType = | "beforeBuild" | "afterBuild" | "beforeUpdate" | "afterUpdate" | "afterRender" | "beforeSave";
/** * An event object */export interface Event { type: EventType; files?: Set<string>;}
/** * A listener for events */export type EventListener = (event: Event) => unknown;
/** * The .src property for a Page or Directory */export interface Src { path: string; ext?: string; lastModified?: Date; created?: Date;}
/** * The .dest property for a Page */export interface Dest { path: string; ext: string; hash?: string;}
/** * The .content property for a Page */export type Content = Uint8Array | string;
/** * Command executed by scripts */export type Command = string | ((site: Site) => unknown) | Command[];
/** * Options available for Commands */export type CommandOptions = Omit<Deno.RunOptions, "cmd">;
/** * A loader is a function that load and return a file content */export type Loader = (path: string) => Promise<Data>;
/** * The available options for the paginate helper */export interface PaginateOptions { size: number; url: (page: number) => string;}
/** * The paginate result */export interface PaginateResult { url: string; results: unknown[]; pagination: { page: number; totalPages: number; totalResults: number; previous: string | null; next: string | null; };}
/** * Available options to configure the site build */export interface SiteOptions { cwd: string; src: string; dest: string; includes: string; dev: boolean; location: URL; metrics: boolean; prettyUrls: boolean; flags: string[]; quiet: boolean; server: ServerOptions;}
/** * The options to configure the local server */export interface ServerOptions { port: number; open: boolean; page404: string;}
/** * A (pre)processor */export type Processor = (page: Page, site: Site) => void;
/** * The function that install a plugin */export type PluginSetup = ((options: unknown) => Plugin);
/** * A generical Lume plugin */export type Plugin = (site: Site) => void;