import nunjucks from 'nunjucks'; import { PageSources } from '../Page/PageSources.js'; import '../patches/nunjucks/index.js'; /** * Wrapper class over a nunjucks environment configured for the respective (sub)site. */ export declare class VariableRenderer { private siteRootPath; private pageSources; private nj; constructor(siteRootPath: string); /** * Processes content with the instance's nunjucks environment. * @param content to process * @param variables to render the content with * @param pageSources to add dependencies found during nunjucks rendering to * @return nunjucks processed content */ renderString(content: string, variables: Record, pageSources: PageSources): string; /** * Processes file content with the instance's nunjucks environment. * @param contentFilePath to process * @param variables to render the content with * @param pageSources to add dependencies found during nunjucks rendering to * @return nunjucks processed content */ renderFile(contentFilePath: string, variables: Record, pageSources: PageSources): string; /** Invalidate the internal nunjucks template cache */ invalidateCache(): void; /** * Compiles a template specified at src independent of the template directory. * This is used for the page template file (page.njk), where none of nunjucks' features * involving path resolving are used. * @param templatePath of the template to compile */ static compile(templatePath: string): nunjucks.Template; } //# sourceMappingURL=VariableRenderer.d.ts.map