SSR / foldkit-ssr/vite

StaticSite

interface · packages/ssr/src/vite.ts:54

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>
  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
}

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.

Members

StaticSite.config

property · packages/ssr/src/vite.ts:64

readonly config: Resolved | ((path: string) => Resolved | Promise<Resolved>)

StaticSite.plan

property · packages/ssr/src/vite.ts:65

readonly plan: ResumePlan<Model, Fields>

StaticSite.buildId

property · packages/ssr/src/vite.ts:66

readonly buildId?: string | undefined

StaticSite.origin

property · packages/ssr/src/vite.ts:67

readonly origin: string

StaticSite.paths

property · packages/ssr/src/vite.ts:68

readonly paths:
  | ReadonlyArray<SitePath>
  | (() => ReadonlyArray<SitePath> | Promise<ReadonlyArray<SitePath>>)

StaticSite.template

property · packages/ssr/src/vite.ts:70

readonly template: string

property · packages/ssr/src/vite.ts:71

readonly head?: Head | undefined

StaticSite.flags

property · packages/ssr/src/vite.ts:72

readonly flags?: ((path: string) => unknown) | undefined

StaticSite.files

property · packages/ssr/src/vite.ts:73

readonly files?: 'directory' | 'flat' | undefined

StaticSite.sitemap

property · packages/ssr/src/vite.ts:74

readonly sitemap?: boolean | undefined

StaticSite.robots

property · packages/ssr/src/vite.ts:75

readonly robots?: boolean | undefined