Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class PageBuilder
import { PageBuilder } from "https://deno.land/x/frugal@0.2.1/packages/core/mod.ts";

Class handling the page building process (offloading the actual generation to PageGenerator)

Constructors

new
PageBuilder(
page: Page<PATH, DATA, BODY>,
hash: string,
generator: PageGenerator<PATH, DATA, BODY>,
config: PageBuilderConfig,
)

Type Parameters

optional
PATH extends Record<string, string> = Record<string, string>
optional
DATA = unknown
optional
BODY = unknown

Methods

build(path: PATH, phase: Phase): Promise<string>

Build the page for a given path and return the output path.

The build process id memoized and will be skiped if nothing has changed since the last build.

Build the page for all the path returned by getPathList.

getHeaders(path: PATH, phase: Phase)