@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
51 lines (50 loc) • 2.08 kB
TypeScript
import { CustomizedFunctions, TemplateFuncMap } from '../type';
import { TemplateEngine } from '../entity/template';
export interface TemplateRegistry {
registerCoreFunctions(funcMap: TemplateFuncMap): void;
registerExtendedFunctions(funcMap: TemplateFuncMap, services: CustomizedFunctions): void;
registerAllFunctions(funcMap: TemplateFuncMap, services?: CustomizedFunctions): void;
}
export declare class DefaultTemplateRegistry implements TemplateRegistry {
registerCoreFunctions(funcMap: TemplateFuncMap): void;
private registerCryptoFunctions;
registerExtendedFunctions(funcMap: TemplateFuncMap, services: CustomizedFunctions): void;
registerAllFunctions(funcMap: TemplateFuncMap, services?: CustomizedFunctions): void;
private registerEngineDependentFunctions;
private registerURLFunctions;
private registerSiteFunctions;
private registerResourcesFunctions;
private registerHugoFunctions;
private registerLanguageFunctions;
private registerStringFunctions;
private escapeHTML;
private truncateText;
private truncateHTML;
private registerMathFunctions;
private registerTimeFunctions;
private registerCollectionFunctions;
private doIndex;
private indexArray;
private indexString;
private indexObject;
private toInteger;
private checkCondition;
private normalizeForComparison;
private registerSafeFunctions;
private registerFmtFunctions;
private registerReflectFunctions;
private registerPathFunctions;
private registerTransformFunctions;
private stripHTML;
private unmarshalContent;
private detectFormat;
private parseYAML;
private parseTOML;
private parseCSV;
private parseCSVLine;
private getNestedValue;
}
export declare function newTemplateRegistry(): TemplateRegistry;
export declare function createCoreFuncMap(): TemplateFuncMap;
export declare function createStandardFuncMap(services: CustomizedFunctions): TemplateFuncMap;
export declare function updateEngineDependentFunctions(engine: TemplateEngine): void;