FSharpApi
module FSharpApi| Assembly | Nacara.Plugin.FSharpApi |
| Attributes | [<RequireQualifiedAccess>] |
API reference pages for F# libraries.
The pages are generated from the assemblies a library ships and go through the pipeline like any other content: same theme, same highlighting, same search index, same link checking.
Functions and values
collection<'FrontMatter> (name: string) (decoder: Decoder<'FrontMatter>) (options: FSharpApiOptions) : Collection<'FrontMatter>
collection<'FrontMatter> (name: string) (decoder: Decoder<'FrontMatter>) (options: FSharpApiOptions) : Collection<'FrontMatter>A collection whose pages are the API reference.
| Parameter | |
|---|---|
name | What you call the collection, and what a menu refers to it by. |
decoder | Reads the front matter the plugin writes - a title, a description - into the site's own type, so these pages carry what every other page carries. |
options | Which assemblies to read, where to publish them, what to leave out. |
create (options: FSharpApiOptions) : IPlugin
create (options: FSharpApiOptions) : IPluginThe plugin itself. The collection produces the pages.
| Parameter | |
|---|---|
options | The same options the collection was given. |
defaults: FSharpApiOptionsexclude (value: string list) (options: FSharpApiOptions) : FSharpApiOptions
exclude (value: string list) (options: FSharpApiOptions) : FSharpApiOptionsNamespaces to leave out, with everything under them.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |
namespaces (assemblies: FSharpApiAssembly list) : FSharpApiNamespace list
namespaces (assemblies: FSharpApiAssembly list) : FSharpApiNamespace listThe namespaces of several assemblies, one entry per package that declares one.
| Parameter | |
|---|---|
assemblies | What was read, in the order it was asked for. |
Returns. One entry per namespace, its declarations sorted by name.
outline (options: FSharpApiOptions) : FSharpApiOutlinePackage list
outline (options: FSharpApiOptions) : FSharpApiOutlinePackage listThe same, read from where the command line says the project root is.
| Parameter | |
|---|---|
options | Which assemblies to read, and what to leave out. |
outlineFrom (projectRoot: AbsolutePath) (options: FSharpApiOptions) : FSharpApiOutlinePackage list
outlineFrom (projectRoot: AbsolutePath) (options: FSharpApiOptions) : FSharpApiOutlinePackage listThe namespaces and what each declares, for a site building its own menu.
Names and page paths, nothing else - a menu belongs to the theme:
let rec entry (item: FSharpApiOutlineEntry) =
match item.Children with
| [] -> Menu.page item.Page
| children -> Menu.group item.Page [ for child in children -> entry child ]
Api.outline options
|> List.map (fun ns -> Menu.group ns.Page [ for item in ns.Entries -> entry item ])
A namespace offers what it declares at the top level; what a module or type declares hangs under it.
| Parameter | |
|---|---|
projectRoot | What the sources' relative paths are resolved against. |
options | Which assemblies to read, and what to leave out. |
read (options: FSharpApiOptions) : FSharpApiAssembly list
read (options: FSharpApiOptions) : FSharpApiAssembly listWhat the assemblies declare, read from where the command line says.
| Parameter | |
|---|---|
options | Which assemblies to read, and what to leave out. |
readFrom (projectRoot: AbsolutePath) (options: FSharpApiOptions) : FSharpApiAssembly list
readFrom (projectRoot: AbsolutePath) (options: FSharpApiOptions) : FSharpApiAssembly listWhat the assemblies declare.
| Parameter | |
|---|---|
projectRoot | What the sources' relative paths are resolved against. |
options | Which assemblies to read, and what to leave out. |
Returns. One entry per assembly that could be read. One that could not is left out here and reported by the collection, which has somewhere to report to.
register (options: FSharpApiOptions) (site: Site) : Site
register (options: FSharpApiOptions) (site: Site) : SiteAdd the API reference to a site.
| Parameter | |
|---|---|
options | The same options the collection was given. |
site | The site being described. |
root (value: string) (options: FSharpApiOptions) : FSharpApiOptions
root (value: string) (options: FSharpApiOptions) : FSharpApiOptionsRoute prefix the pages are published under.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |
sources (value: FSharpApiSource list) (options: FSharpApiOptions) : FSharpApiOptions
sources (value: FSharpApiSource list) (options: FSharpApiOptions) : FSharpApiOptionsSet Sources.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |
title (value: string) (options: FSharpApiOptions) : FSharpApiOptions
title (value: string) (options: FSharpApiOptions) : FSharpApiOptionsTitle of the page that lists the namespaces.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |
warnOnUndocumented (value: bool) (options: FSharpApiOptions) : FSharpApiOptions
warnOnUndocumented (value: bool) (options: FSharpApiOptions) : FSharpApiOptionsReport a member that takes parameters and documents none of them.
| Parameter | |
|---|---|
value | The value to use. |
options | The options so far. |