Module

x/lume/core/file.ts>Page

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class Page
import { Page } from "https://dotland.deno.dev/x/lume@v2.2.1/core/file.ts";

A page of the site

Constructors

new
Page(src?: Partial<Src>)

Type Parameters

optional
D extends Data = Data

Properties

_data: Record<string, unknown>

The property _data is to store internal data, used by plugins, processors, etc to save arbitrary values

asset: boolean

If the page is an asset or not

content: Content | undefined

The content of this page

data: D

Used to save the page data

document: Document | undefined

The parsed HTML code from the content

readonly
outputPath: string

Returns the output path of this page

readonly
sourcePath: string

Returns the source path of this page

src: Src

The src info

Methods

duplicate(index: number | undefined, data: D): Page<D>

Duplicate this page.

Static Methods

create(data: Partial<Data> & { url: string; }): Page

Convenient way to create a page dynamically