@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
24 lines (23 loc) • 749 B
TypeScript
import { File } from '../type';
export type FileOpener = () => Promise<File>;
export interface MetaProvider {
meta(): FileMeta;
}
export declare class FileMeta {
private filename;
private componentRoot;
private componentDir;
private openFunc;
constructor(filename?: string, openFunc?: FileOpener | null);
fileName(): string;
relativeFilename(): string;
component(): string;
root(): string;
open(): Promise<File>;
setFileName(filename: string): void;
setComponentRoot(root: string): void;
setComponentDir(dir: string): void;
setOpenFunc(openFunc: FileOpener): void;
merge(from: FileMeta): void;
}
export declare function newFileMeta(filename?: string, openFunc?: FileOpener): FileMeta;