Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lume/plugins/nunjucks.ts>NunjucksEngine

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class NunjucksEngine
implements Engine
import { NunjucksEngine } from "https://deno.land/x/lume@v2.2.4/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