This template scaffolds the necessary folder structure for FSharp.Formatting and adds custom styles in the fslab theme.
The provided stylesheet was compiled from sass (before uploading the nuget package) and uses the Bulma CSS framework instead of bootstrap which is used by FSharp.Formatting per default.
This template is available as a dotnet new template (from nuget):
If not already present, create a local tool manifest in the root of your project that you want to write documentation for:
Then, still in the root of your project, run:
See further below for command line customization options of the template:
The template initializes the following folder structure when you initialize it in the root of your project:
docs │ index.fsx │ _template.html │ ├───content │ 0_Markdown-Cheatsheet.md │ 1_fsharp-code-example.fsx │ fsdocs-custom.css │ fsdocs-custom.min.css │ ├───img │ favicon.ico │ logo.png │ └───reference _template.html
index.fsx is the file you are reading just now. It contains the very content you are reading at the moment
in a markdown block indicated by
(** *) guards. It will be rendered as the root
index.html file of your documentation.
_template.html is the root html scaffold (sidebar to the left, script and style loading) where all of the individual docs will be injected into
content folder contains the following files:
1_fsharp-code-example.fsx is a script file that showcases the syntax highlighting style for F# snippets.
It can also be viewed in all its glory here.
fsdocs-custom.min.css contain the custom styling that applies the fslab styles.
img folder contains the fslab logo and favicon. replace these files (with the same names) to youse sours
reference/_template.html is a slightly adapted version of the template above for the API documentation
dotnet fsdocs watch --eval to spawn a watcher and dev server that hosts your docs on http://localhost:8901/ (You currently will still have to refresh the page when you make changes to files)
add a new .md or .fsx file to the
content directory (or into a new subdirectory there)
(** <markdown here> *) to guard markdown sections in .fsx files
(*** include-value:<val name> ***) to include the value of a binding
(*** include-it ***) to include the evaluation of the previous snippet block
For more info please refer to the FSharp.Formatting documentation.