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@v1.19.0/plugins/nunjucks.ts";

Template engine to render Nunjucks files

Constructors

new
NunjucksEngine(env: any, basePath: string)

Properties

basePath: string
cache: Map
env: any

Methods

addHelper(
name: string,
fn: Helper,
options: HelperOptions,
)
deleteCache(file: string): void
getTemplate(content: string, filename: string)
render(
content: string,
data?: Data,
filename?: string,
)
renderSync(
content: string,
data?: Data,
filename?: string,
): string