File-based source

Scan build output directories for HTML files

Overview

The file-based source scans a build output directory for HTML files and turns them into page candidates. It is the default source for most static or pre-rendered sites. See Index sources for how sources fit into the pipeline.

Options (CLI)

OptionTypeDefaultDescription
projectDirstringprocess.cwd()Project root directory.
sourceDirstringauto-detectedBuild output directory to scan.
globstring**/*.{html,htm}Glob pattern for HTML files.

Example (CLI)

peam \
  --source fileBased --projectDir . --sourceDir dist --glob "**/*.html" \
  --store fileBased --indexPath .peam/index.json

Notes

  • The source auto-detects output folders like .next, dist, and build if sourceDir is not provided.
  • It normalizes paths by stripping common build prefixes and removing .html / /index.

On this page

GitHubEdit this page on GitHub