MkDocsAliases.

MkDocsServeAsync(ICakeContext, DirectoryPath) Method

Summary

Run the builtin development server async.
Assembly
Cake.MkDocs.dll
Namespace
Cake.MkDocs
Containing Type
MkDocsAliases

Syntax

public static Task MkDocsServeAsync(this ICakeContext context, DirectoryPath projectDirectory)

Examples

var task = MkDocsServeAsync("./docs-project");
// Do work...
task.Wait();
var task = MkDocsServeAsync(new DirectoryPath("./docs-project"));
// Do work...
task.Wait();

Remarks

This method will block build process. Use Ctrl+C in console to quit or use System.Threading.CancellationToken to cancel task programmatically.

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
projectDirectory DirectoryPath Project directory path to serve.

Return Value

Type Description
Task Long running task.