Module

x/lume/plugins/nunjucks.ts>NunjucksEngine

🔥 Static site generator for Deno 🦕
Very Popular
Latest
class NunjucksEngine
implements Engine
import { NunjucksEngine } from "https://dotland.deno.dev/x/lume@v2.4.2/plugins/nunjucks.ts";

Template engine to render Nunjucks files

Constructors

new
NunjucksEngine(
env: any,
basePath: string,
includes: string,
)

Properties

basePath: string
cache: Map
env: any
includes: string

Methods

addHelper(
name: string,
fn: Helper,
options: HelperOptions,
)
deleteCache(file: string): void
getTemplate(content: string, filename: string)
render(
content: string,
data?: Record<string, unknown>,
filename?: string,
): Promise<string>
renderComponent(
content: string,
data?: Record<string, unknown>,
filename?: string,
): string