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

x/lume/core.ts>Renderer

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class Renderer
Re-export
import { Renderer } from "https://deno.land/x/lume@v1.18.2/core.ts";

The renderer is responsible for rendering the site pages in the right order and using the right template engine.

Constructors

new
Renderer(options: Options)

Properties

formats: Formats

Available file formats

fs: FS

The filesystem instance used to read the layouts

helpers: Map<string, [Helper, HelperOptions]>

The registered helpers

includes: string

The default folder to include the layouts

preprocessors: Processors

All preprocessors

prettyUrls: boolean

To convert the urls to pretty /example.html => /example/

Methods

addHelper(
name: string,
fn: Helper,
options: HelperOptions,
)

Register a new helper used by the template engines

render<T>(
content: unknown,
data: Data,
filename: string,
): Promise<T>

Render a template

renderPageOnDemand(page: Page): Promise<void>

Render the provided pages

renderPages(
from: Page[],
to: Page[],
onDemand: Page[],
): Promise<void>

Render the provided pages