StaticSite.config
property · packages/ssr/src/vite.ts:75
readonly config: Resolved | ((path: string) => Resolved | Promise<Resolved>)SSR / foldkit-ssr/vite
interface · packages/ssr/src/vite.ts:65
interface StaticSite<
Model,
Fields extends Schema.Struct.Fields,
Message,
Resolved = ResumableConfig<Model, Message>,
> {
readonly config: Resolved | ((path: string) => Resolved | Promise<Resolved>)
readonly plan:
ResumePlan<Model, Fields> | ((path: string) => ResumePlan<Model, Fields>)
readonly buildId?: string | undefined
readonly origin: string
readonly paths:
| ReadonlyArray<SitePath>
| (() => ReadonlyArray<SitePath> | Promise<ReadonlyArray<SitePath>>)
readonly template: string
readonly head?: Head | undefined
readonly flags?: ((path: string) => unknown) | undefined
readonly files?: 'directory' | 'flat' | undefined
readonly sitemap?: boolean | undefined
readonly robots?: boolean | undefined
readonly emit?:
| ((pages: ReadonlyArray<BuiltPage>) => Promise<ReadonlyArray<EmittedFile>>)
| undefined
}What a static site is: everything SSR.generate takes, plus where its
pages land. config may read the path (a site whose Model is prepared
per page satisfies and returns its own config for it); paths may close
over what the site serves (a thunk that seeds and lists, evaluated when
the build runs). template is the built shell the pages are rendered
into; files is the host's layout; sitemap and robots write their
files from the generated pages; emit adds files of its own made from them.
StaticSite.configproperty · packages/ssr/src/vite.ts:75
readonly config: Resolved | ((path: string) => Resolved | Promise<Resolved>)StaticSite.planproperty · packages/ssr/src/vite.ts:82
readonly plan:
ResumePlan<Model, Fields> | ((path: string) => ResumePlan<Model, Fields>)The plan every page resumes with, or a function of the path for a site of
more than one application: each path then resumes with the plan of the
application config returns for it. A function that throws fails the
build, naming the path.
StaticSite.buildIdproperty · packages/ssr/src/vite.ts:83
readonly buildId?: string | undefinedStaticSite.originproperty · packages/ssr/src/vite.ts:84
readonly origin: stringStaticSite.pathsproperty · packages/ssr/src/vite.ts:85
readonly paths:
| ReadonlyArray<SitePath>
| (() => ReadonlyArray<SitePath> | Promise<ReadonlyArray<SitePath>>)StaticSite.templateproperty · packages/ssr/src/vite.ts:88
readonly template: stringStaticSite.headproperty · packages/ssr/src/vite.ts:89
readonly head?: Head | undefinedStaticSite.flagsproperty · packages/ssr/src/vite.ts:90
readonly flags?: ((path: string) => unknown) | undefinedStaticSite.filesproperty · packages/ssr/src/vite.ts:91
readonly files?: 'directory' | 'flat' | undefinedStaticSite.sitemapproperty · packages/ssr/src/vite.ts:92
readonly sitemap?: boolean | undefinedStaticSite.robotsproperty · packages/ssr/src/vite.ts:93
readonly robots?: boolean | undefinedStaticSite.emitproperty · packages/ssr/src/vite.ts:99
readonly emit?:
| ((pages: ReadonlyArray<BuiltPage>) => Promise<ReadonlyArray<EmittedFile>>)
| undefinedFiles made from the generated pages, written beside them: what the pages
reference and the build must also serve, such as the image variants
their srcsets name (foldkit-media's materialize).