PluginPagesContext #
What a generator function of pages() receives.
Fields #
command'dev' | 'build'
dev while serving the site, build for kawapress build.
read(path: string): Promise<string>
Reads a UTF-8 text file and records it as a dependency of this group of pages. A relative path starts from the site root.
glob(pattern: string | readonly string[]): Promise<string[]>
Finds files and returns their absolute paths, sorted. The pattern is recorded as a dependency of this group of pages. A relative pattern starts from the site root.
Full type signature
TypeScript
interface PluginPagesContext {
command: 'dev' | 'build'
read: (path: string) => Promise<string>
glob: (pattern: string | readonly string[]) => Promise<string[]>
}

Comments