Module

x/lume/core/renderer.ts>Engine

🔥 Static site generator for Deno 🦕
Very Popular
Latest
interface Engine
import { type Engine } from "https://dotland.deno.dev/x/lume@v2.3.3/core/renderer.ts";

An interface used by all template engines

Type Parameters

optional
T = string | { toString(): string; }

Properties

optional
includes: string

The folder name of the includes

Methods

deleteCache(file: string): void

Delete a cached template

render(
content: unknown,
data?: Record<string, unknown>,
filename?: string,
): T | Promise<T>

Render a template (used to render pages)

renderComponent(
content: unknown,
data?: Record<string, unknown>,
filename?: string,
): T

Render a component (it must be synchronous)

addHelper(
name: string,
fn: Helper,
options: HelperOptions,
): void

Add a helper to the template engine