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

x/lume/core/source.ts>default

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

Scan and load files from the source folder with the data, pages, assets and static files

Constructors

new
default(options: Options)

Properties

componentLoader: ComponentLoader

To load all components

components: { cssFile: string; jsFile: string; variable: string; }
dataLoader: DataLoader

To load all _data files

extraCode: Map<string, Map<string, string>>

Extra code generated by the components

filters: ScopeFilter[]

The path filters to ignore

formats: Formats

Info about how to handle different file formats

ignored: Set<string>

The list of paths to ignore

pageLoader: PageLoader

To load all pages

pagePreparer: PagePreparer

To prepare the pages

reader: Reader

Filesystem reader to scan folders

root: Directory

The root of the src directory

staticPaths: Map<string, string | ((path: string) => string) | undefined>

List of static files and folders to copy

Methods

addIgnoredPath(path: string)
addStaticPath(from: string, to?: string | ((path: string) => string))

Returns the pages with extra code generated by the components

getContent(
parentData: Data,
parentComponents: Components,
pageFilters: ((page: Page) => boolean)[],
): [Page[], StaticFile[]]

Return the site content

Load all sources

update(file: string, onDemand?): Promise<void>

Update a file