INFO

This API documentation is for FAKE version 5.0 or later. The old API documentation can be found here for migration or here for fake 4

This is part of the Fake.Documentation.DocFx module.

DocFx

Contains helper functions to use DocFx https://dotnet.github.io/docfx/.

Nested types and modules

TypeDescription
BuildParams

Build-Command parameters

CommonParams
DownloadParams

Download-Command parameters

ExportTemplateParams

ExportTemplate-Command parameters

InitParams

Init-Command parameters

LogLevel
LogParams

Parameters for logging

MetadataParams

Metadata-Command parameters

PdfParams

Pdf-Command parameters

ServeParams

Serve-Command parameters

Functions and values

Function or valueDescription
build(setParams)
Signature: setParams:(BuildParams -> BuildParams) -> unit

Builds a DocFx documentation.

Parameters

  • setParams - Function used to manipulate the default build parameters. See BuildParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    
    DocFx.build (fun p -> 
     { p with 
         OutputFolder = "build" @@ "docs"
         ConfigFile = "docs" @@ "docfx.json"    
     })
    
download(setParams)
Signature: setParams:(DownloadParams -> DownloadParams) -> unit

Download xref archive.

Parameters

  • setParams - Function used to manipulate the default download parameters. See DownloadParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    
     DocFx.download (fun p -> 
         { p with 
                 ArchiveFile = "archive"
                 Uri = "uri"
         })
    
exec(setParams command args)
Signature: setParams:(CommonParams -> CommonParams) -> command:string -> args:string -> unit
exportTemplate(setParams)
Signature: setParams:(ExportTemplateParams -> ExportTemplateParams) -> unit

Exports template files.

Parameters

  • setParams - Function used to manipulate the default exportTemplate parameters. See ExportTemplateParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    
     DocFx.exportTemplate (fun p -> 
         { p with 
                 All = true
                 OutputFolder = "templates"
         })
    
init(setParams)
Signature: setParams:(InitParams -> InitParams) -> unit

Initialize a DocFx documentation.

Parameters

  • setParams - Function used to manipulate the default Init parameters. See InitParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    
     DocFx.init (fun p -> 
      { p with 
          Overwrite = true
          Timeout = TimeSpan.FromMinutes 10.
      })
    
metadata(setParams)
Signature: setParams:(MetadataParams -> MetadataParams) -> unit

Serves a DocFx documentation.

Parameters

  • setParams - Function used to manipulate the default serve parameters. See MetadataParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    
     DocFx.metadata (fun p -> 
         { p with 
                 ConfigFile = "docs" @@ "docfx.json"
                 DisableGitFeatures = true
         })
    
pdf(setParams)
Signature: setParams:(PdfParams -> PdfParams) -> unit

Builds a Pdf-File from a DocFx documentation.

Parameters

  • setParams - Function used to manipulate the default pdf parameters. See PdfParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    6: 
    7: 
    8: 
    
    DocFx.pdf (fun p ->
        { p with
                Name = "Docs.pdf" }
          .WithBuildParams (fun b -> 
               { b with 
                   OutputFolder = "build" @@ "docs"
                   ConfigFile = "docs" @@ "docfx.json"})
                )   
    
serve(setParams)
Signature: setParams:(ServeParams -> ServeParams) -> unit

Serves a DocFx documentation.

Parameters

  • setParams - Function used to manipulate the default serve parameters. See ServeParams.Create()

    Sample

    1: 
    2: 
    3: 
    4: 
    5: 
    6: 
    
     DocFx.serve (fun p -> 
         { p with 
                 Host = "localhost"
                 Port = Some 80
                 Folder = "docs"
         })
    
union case Option.Some: Value: 'T -> Option<'T>