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

x/lume/plugins/pug.ts>PugEngine

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class PugEngine
implements Engine
import { PugEngine } from "https://deno.land/x/lume@v2.3.0/plugins/pug.ts";

Template engine to render Pug files

Constructors

new
PugEngine(
compiler: Compiler,
basePath: string,
includes: string,
options?: PugOptions,
)

Properties

basePath: string
cache: Map<string, (data?: Record<string, unknown>) => string>
compiler: Compiler
filters: Record<string, Helper>
includes: string
options: PugOptions

Methods

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