Skip to main content
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.1.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