SiteBuilderModule
PackageFsLiveDocs.Renderer
SiteBuilder
SiteBuilder renders guide pages, API pages, the API index, version navigation, and llms.txt.
Use build for one resolved site. Use buildHistory for a set of verified release sites.
buildHistory renders the current version at the output root and older versions below history/<version>/.
Callers provide renderer-neutral package and content models. SiteBuilder owns final HTML and generated-link validation.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| renderPage | renderPage page context | Renders a single Markdown guide page. |
| renderEntityPage | renderEntityPage e context | Renders a single API entity page (Module or Type). |
| generateLlmsTxt | generateLlmsTxt package | Generates a text-based summary of the API for LLM consumption. |
| build | build context | Builds the primary documentation site. |
| buildAll | buildAll historyDir currentPackage pages config theme outputDir | Builds the current site and computes the version list from history snapshots. |
| buildHistory | buildHistory currentVersion sites config theme outputDir | Builds current and historical sites from verified API models and tagged documentation trees. |
Renders a single Markdown guide page.
Parameters
| Name | Type | Description |
|---|---|---|
| page | ContentPage | The processed content page to render. |
| context | SiteRenderContext |
Returns
string
Renders a single API entity page (Module or Type).
Parameters
| Name | Type | Description |
|---|---|---|
| e | EntityModel | The entity to render. |
| context | SiteRenderContext |
Returns
string
Generates a text-based summary of the API for LLM consumption.
Parameters
| Name | Type | Description |
|---|---|---|
| package | PackageModel | The package model to summarize. |
Returns
string
Verification Examples
GenerateLlmsTxtExample
> let package = { Version = "1.0"; Entities = []; Scenarios = []; Packages = [] };;
val package: PackageModel = { Version = "1.0"
Entities = []
Scenarios = []
Packages = [] }
> let summary = SiteBuilder.generateLlmsTxt package;;
val summary: string = "# API Reference for LLMs
"
> summary.Split('\n').[0];;
val it: string = "# API Reference for LLMs"Builds the primary documentation site.
Parameters
| Name | Type | Description |
|---|---|---|
| context | SiteBuildContext |
Returns
unit
Builds the current site and computes the version list from history snapshots.
Parameters
| Name | Type | Description |
|---|---|---|
| historyDir | string | The directory containing previous package snapshots. |
| currentPackage | PackageModel | The latest package model. |
| pages | ContentPage list | The guide pages to render. |
| config | SiteConfig | Build-time site configuration. |
| theme | string | The active DaisyUI theme. |
| outputDir | string | The output directory that will receive the rendered site. |
Returns
unit
Builds current and historical sites from verified API models and tagged documentation trees.
Parameters
| Name | Type | Description |
|---|---|---|
| currentVersion | string | |
| sites | (string * PackageModel * ContentPage list * string) list | |
| config | SiteConfig | |
| theme | string | |
| outputDir | string |
Returns
unit