LinkExtensions.

GetLink(IExecutionContext, NormalizedPath, string, DirectoryPath, bool, bool, bool, bool) Method

Summary

Converts the path into a string appropriate for use as a link, overriding one or more settings from the Wyam.Common.Configuration.IReadOnlySettings.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Execution
Containing Type
LinkExtensions

Syntax

public static string GetLink(this IExecutionContext context, NormalizedPath path, string host, DirectoryPath root, bool useHttps, bool hideIndexPages, bool hideExtensions, bool lowercase)

Parameters

Name Type Description
context IExecutionContext The execution context.
path NormalizedPath The path to generate a link for.
host string The host to use for the link.
root DirectoryPath The root of the link. The value of this parameter is prepended to the path.
useHttps bool If set to true, HTTPS will be used as the scheme for the link.
hideIndexPages bool If set to true, "index.htm" and "index.html" file names will be hidden.
hideExtensions bool If set to true, extensions will be hidden.
lowercase bool If set to true, links will be rendered in all lowercase.

Return Value

Type Description
string A string representation of the path suitable for a web link with the specified root and hidden file name or extension.
GitHub