Get started
This guide creates a local documentation site for one F# project.
Before you begin
You need:
- the .NET SDK used by your project;
- a successful project build;
- FsLiveDocs installed as a local or global .NET tool.
Install the tool
Create a tool manifest and install FsLiveDocs:
dotnet new tool-manifest
dotnet tool install FsLiveDocs
Initialize the repository
Run this command from the repository root:
dotnet livedocs init --discover-projects
--discover-projects writes the repository's documentable .fsproj files to the configuration. Review that list when the repository also contains benchmarks, probes, or applications that should not appear in the API reference.
The command creates:
.livedocs/config.jsonfor site configuration;.livedocs/history.jsonfor release capsules;docs/index.mdas a starter page;- cache and release-download entries in
.gitignore.
The command does not replace existing files. Project arguments passed to later commands override the configured list; without either, FsLiveDocs discovers projects for that run.
Write the primary API pages
Use Markdown under docs/api/ for the main documentation of public namespaces, modules, and types. XML comments remain useful for concise member documentation and editor tooltips, but they do not need to carry an entire guide.
Start with Write primary API pages, then add task-oriented guides for workflows that cross several API entities.
Add a guide page
Create docs/getting-started.md:
---
title: Getting started
---
# Getting started
```fsharp isolated
let greeting name = $"Hello, {name}!"
greeting "Ada"
```
The isolated mode checks the block independently. Use an ordinary fsharp fence when later blocks depend on earlier blocks on the same page.
Audit the documentation
Build your project, then audit every F# block:
dotnet build
dotnet livedocs audit
Fix compilation failures or mark deliberate pseudocode with a reason:
```fsharp no-check reason="The omitted branch is application-specific"
match result with
| Ok value -> save value
| Error _ -> ...
```
Build the site
dotnet livedocs build
The generated site is in output/.
Preview changes
dotnet livedocs watch --host 127.0.0.1 --port 5000
The watcher rebuilds after source, project, configuration, or documentation changes.