API โบ @builder.io/qwik-city/static
generate
Use this function when SSG should be generated from another module, such as a Vite plugin. This function's should be passed the paths of the entry module and Qwik City Plan.
export declare function generate(
  opts: StaticGenerateOptions,
): Promise<StaticGenerateResult>;| Parameter | Type | Description | 
|---|---|---|
| opts | 
Returns:
Promise<StaticGenerateResult>
StaticGenerateOptions
export interface StaticGenerateOptions extends StaticGenerateRenderOptionsExtends: StaticGenerateRenderOptions
| Property | Modifiers | Type | Description | 
|---|---|---|---|
| string | (Optional) Defaults to  | ||
| string | Path to the Qwik City Plan module exporting the default  | ||
| string | Path to the SSR module exporting the default render function. In most cases it'll be  | ||
| string | (Optional) | 
StaticGenerateRenderOptions
export interface StaticGenerateRenderOptions extends RenderOptionsExtends: RenderOptions
| Property | Modifiers | Type | Description | 
|---|---|---|---|
| boolean | (Optional) Set to  | ||
| boolean | (Optional) Set to  | ||
| boolean | (Optional) Set to  | ||
| string[] | (Optional) Defines file system routes relative to the source  | ||
| string[] | (Optional) Defines file system routes relative to the source  | ||
| 'debug' | (Optional) Log level. | ||
| number | (Optional) Maximum number of tasks to be running at one time per worker. Defaults to  | ||
| number | (Optional) Maximum number of workers to use while generating the static pages. Defaults to the number of CPUs available. | ||
| string | The URL  The  If the site also starts with a pathname other than  | ||
| string | File system directory where the static files should be written. | ||
| string | null | (Optional) File system path to write the  | 
StaticGenerateResult
export interface StaticGenerateResult| Property | Modifiers | Type | Description | 
|---|---|---|---|
| number | |||
| number | |||
| number | |||
| string[] | 
