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

NameSignatureSynopsis
renderPagerenderPage page contextRenders a single Markdown guide page.
renderEntityPagerenderEntityPage e contextRenders a single API entity page (Module or Type).
generateLlmsTxtgenerateLlmsTxt packageGenerates a text-based summary of the API for LLM consumption.
buildbuild contextBuilds the primary documentation site.
buildAllbuildAll historyDir currentPackage pages config theme outputDirBuilds the current site and computes the version list from history snapshots.
buildHistorybuildHistory currentVersion sites config theme outputDirBuilds current and historical sites from verified API models and tagged documentation trees.

renderPage

renderPage page context
Member
Renders a single Markdown guide page.

Parameters

NameTypeDescription
pageContentPageThe processed content page to render.
contextSiteRenderContext

Returns

string

renderEntityPage

renderEntityPage e context
Member
Renders a single API entity page (Module or Type).

Parameters

NameTypeDescription
eEntityModelThe entity to render.
contextSiteRenderContext

Returns

string

generateLlmsTxt

generateLlmsTxt package
Member
Generates a text-based summary of the API for LLM consumption.

Parameters

NameTypeDescription
packagePackageModelThe 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"

build

build context
Member
Builds the primary documentation site.

Parameters

NameTypeDescription
contextSiteBuildContext

Returns

unit

buildAll

buildAll historyDir currentPackage pages config theme outputDir
Member
Builds the current site and computes the version list from history snapshots.

Parameters

NameTypeDescription
historyDirstringThe directory containing previous package snapshots.
currentPackagePackageModelThe latest package model.
pagesContentPage listThe guide pages to render.
configSiteConfigBuild-time site configuration.
themestringThe active DaisyUI theme.
outputDirstringThe output directory that will receive the rendered site.

Returns

unit

buildHistory

buildHistory currentVersion sites config theme outputDir
Member
Builds current and historical sites from verified API models and tagged documentation trees.

Parameters

NameTypeDescription
currentVersionstring
sites(string * PackageModel * ContentPage list * string) list
configSiteConfig
themestring
outputDirstring

Returns

unit