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

x/lume/core/filesystem.ts>Page

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class Page
import { Page } from "https://deno.land/x/lume@v1.18.5/core/filesystem.ts";

A page of the site

Constructors

new
Page(src?: Partial<Src>)

Type Parameters

optional
D extends PageData = PageData

Properties

_data: Record<string, unknown>

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

content: Content | undefined

The content of this page

data: D

Used to save the page data

deprecated
readonly
dest: Dest
document: HTMLDocument | undefined

The parsed HTML code from the content

readonly
outputPath: string | undefined

Returns the output path of this page

src: Src

The src info

Methods

duplicate(index?: number, data?: D): Page

Duplicate this page.

deprecated
updateDest(dest: Partial<Dest>): void

Update the destination file. It also update the data.url accordingly

Static Methods

create(url: string, content: Content): Page

Convenient way to create a page dynamically with a url and content