ContentProviderModule

PackageFsLiveDocs.Core

ContentProvider

ContentProvider loads Markdown, parses page metadata, expands transclusions, resolves semantic references, validates links, and copies documentation assets.

Capture uses expandTransclusions to create canonical Markdown while preserving xref identifiers.

Rendering uses resolveSnippets to resolve remaining semantic references and format matched semantic code blocks.

Use scanDocsWithOptions when you already have a semantic artifact. Use scanDocs for current syntax-only or default behavior.

Summary

NameSignatureSynopsis
exampleShortcodePatternexampleShortcodePattern Matches the shortcode that transcludes an XML example into a page.
transcludedExampleNamestranscludedExampleNames bodyNames of the XML examples a page body transcludes.
outputPathForoutputPathFor docsDir filePathMaps a Markdown file to its stable output path relative to the docs root.
copyStaticFilescopyStaticFiles docsDir outputDirCopies consumer-owned non-Markdown files from the docs tree into the generated site.
defaultTitledefaultTitle filePathNo description available.
pipelinepipeline The shared Markdig pipeline with advanced extensions enabled.
deserializerdeserializer The YAML deserializer for frontmatter processing.
findIndexIterationfindIndexIteration start f arrHelper to find the index of an element starting from a given position.
parseFrontMatterparseFrontMatter contentParses the YAML frontmatter from a raw Markdown string.
findMemberfindMember id packageSearches for a member by ID or Name within a PackageModel.
findEntityfindEntity id packageNo description available.
findExamplefindExample id packageNo description available.
expandTransclusionsexpandTransclusions body sourceDir packageExpands source and XML-example transclusions while preserving semantic cross-references.
resolveSnippetsresolveSnippets body sourceDir package rootPathResolves transclusions and semantic links for a current render.
loadPageloadPage filePath sourceDir package rootPath currentOutputPath allowedOutputsLoads and processes a single Markdown page.
scanDocsWithOptionsscanDocsWithOptions docsDir sourceDir package rootPath semanticCodeScans guides and semantically formats F# fences using the supplied assembly references.
scanDocsscanDocs docsDir sourceDir package rootPathScans the docs directory and loads all guide pages.
applyApiDocsWithOptionsapplyApiDocsWithOptions docsDir sourceDir package semanticCodeApplies long-form API documentation with semantic F# formatting.
applyApiDocsapplyApiDocs docsDir sourceDir packageApplies long-form documentation from docs/api/*.md to the package model.

exampleShortcodePattern

exampleShortcodePattern
Member
Matches the shortcode that transcludes an XML example into a page.

Returns

string

transcludedExampleNames

transcludedExampleNames body
Member
Names of the XML examples a page body transcludes.

Parameters

NameTypeDescription
bodystring

Returns

Set<string>

outputPathFor

outputPathFor docsDir filePath
Member
Maps a Markdown file to its stable output path relative to the docs root.

Parameters

NameTypeDescription
docsDirstring
filePathstring

Returns

string

copyStaticFiles

copyStaticFiles docsDir outputDir
Member
Copies consumer-owned non-Markdown files from the docs tree into the generated site.

Parameters

NameTypeDescription
docsDirstring
outputDirstring

Returns

unit

defaultTitle

defaultTitle filePath
Member

Parameters

NameTypeDescription
filePathstring

Returns

string

pipeline

pipeline
Member
The shared Markdig pipeline with advanced extensions enabled.

Returns

MarkdownPipeline

deserializer

deserializer
Member
The YAML deserializer for frontmatter processing.

Returns

IDeserializer

findIndexIteration

findIndexIteration start f arr
Member
Helper to find the index of an element starting from a given position.

Parameters

NameTypeDescription
startint
f'T -> bool
arr'T[]

Returns

int option

parseFrontMatter

parseFrontMatter content
Member
Parses the YAML frontmatter from a raw Markdown string.

Parameters

NameTypeDescription
contentstring

Returns

(ContentMetadata * string) option

findMember

findMember id package
Member
Searches for a member by ID or Name within a PackageModel.

Parameters

NameTypeDescription
idstring
packagePackageModel

Returns

MemberModel option

findEntity

findEntity id package
Member

Parameters

NameTypeDescription
idstring
packagePackageModel

Returns

EntityModel option

findExample

findExample id package
Member

Parameters

NameTypeDescription
idstring
packagePackageModel

Returns

ExampleModel option

expandTransclusions

expandTransclusions body sourceDir package
Member
Expands source and XML-example transclusions while preserving semantic cross-references.

Parameters

NameTypeDescription
bodystring
sourceDirstring
packagePackageModel

Returns

string

resolveSnippets

resolveSnippets body sourceDir package rootPath
Member
Resolves transclusions and semantic links for a current render.

Parameters

NameTypeDescription
bodystring
sourceDirstring
packagePackageModel
rootPathstring

Returns

string

loadPage

loadPage filePath sourceDir package rootPath currentOutputPath allowedOutputs
Member
Loads and processes a single Markdown page.

Parameters

NameTypeDescription
filePathstringThe markdown file to read.
sourceDirstringThe root directory used to resolve snippet shortcodes.
packagePackageModelThe extracted package model used for examples and xrefs.
rootPathstringThe relative root path used when generating links.
currentOutputPathstringThe output HTML path used for link validation.
allowedOutputsSet<string>The set of known output pages used to validate local links.

Returns

ContentPage

scanDocsWithOptions

scanDocsWithOptions docsDir sourceDir package rootPath semanticCode
Member
Scans guides and semantically formats F# fences using the supplied assembly references.

Parameters

NameTypeDescription
docsDirstring
sourceDirstring
packagePackageModel
rootPathstring
semanticCodeOptions

Returns

ContentPage list

scanDocs

scanDocs docsDir sourceDir package rootPath
Member
Scans the docs directory and loads all guide pages.

Parameters

NameTypeDescription
docsDirstringThe docs root containing markdown pages.
sourceDirstringThe source root used for snippet resolution.
packagePackageModelThe extracted package model used for xrefs and examples.
rootPathstringThe relative root path used when rendering links.

Returns

ContentPage list

applyApiDocsWithOptions

applyApiDocsWithOptions docsDir sourceDir package semanticCode
Member
Applies long-form API documentation with semantic F# formatting.

Parameters

NameTypeDescription
docsDirstring
sourceDirstring
packagePackageModel
semanticCodeOptions

Returns

PackageModel

applyApiDocs

applyApiDocs docsDir sourceDir package
Member
Applies long-form documentation from docs/api/*.md to the package model.

Parameters

NameTypeDescription
docsDirstringThe docs root that contains the api subdirectory.
sourceDirstringThe source root used for snippet resolution.
packagePackageModelThe current package model to enrich.

Returns

PackageModel

Examples

ResolveSnippetExample

> let package = { Version = "1.0"; Entities = []; Scenarios = []; Packages = [] };;
val package: PackageModel = { Version = "1.0"
  Entities = []
  Scenarios = []
  Packages = [] }

> ContentProvider.resolveSnippets "Hello" "." package "";;
val it: string = "Hello"