MkDocsAliases.

MkDocsServe(ICakeContext, DirectoryPath, MkDocsServeSettings) Method

Summary

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

Syntax

public static void MkDocsServe(this ICakeContext context, DirectoryPath projectDirectory, MkDocsServeSettings settings)

Examples

MkDocsServe("./docs-project", new MkDocsServeSettings()
{
    DevAddr = new MkDocsAddress("localhost", 8090),
    Theme = MkDocsTheme.ReadTheDocs
});
MkDocsServe(new DirectoryPath("./docs-project"), new MkDocsServeSettings()
{
    DevAddr = new MkDocsAddress("localhost", 8090),
    Theme = MkDocsTheme.ReadTheDocs
});
try
{
    MkDocsServe(new DirectoryPath("./docs-project"), new MkDocsServeSettings()
    {
        ToolTimeout = new TimeSpan(0, 0, 1, 0)
    });
}
catch (TimeoutException)
{
    // Kill tool process after 1 minute
}

Remarks

This method will block build process. Use Ctrl+C in console to quit.

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute

Parameters

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

Return Value

Type Description
void