LinkExtensions Class

Summary

Extensions to generate web links using global settings.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Execution
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["LinkExtensions"] class Type type-node

Syntax

public static class LinkExtensions

Methods

Name Value Summary
GetLink(IExecutionContext) string
Gets a link for the root of the site using the host and root path specified in the settings.
static
GetLink(IExecutionContext, IMetadata, bool) string
Gets a link for the specified metadata (typically a document) using the "RelativeFilePath" metadata value and the default settings from the Wyam.Common.Configuration.IReadOnlySettings. This version should be used inside modules to ensure consistent link generation. Note that you can optionally include the host or not depending on if you want to generate host-specific links. By default, the host is not included so that sites work the same on any server including the preview server.
static
GetLink(IExecutionContext, IMetadata, string, bool) string
Gets a link for the specified metadata (typically a document) using the specified metadata value (by default, "RelativeFilePath") and the default settings from the Wyam.Common.Configuration.IReadOnlySettings. This version should be used inside modules to ensure consistent link generation. Note that you can optionally include the host or not depending on if you want to generate host-specific links. By default, the host is not included so that sites work the same on any server including the preview server.
static
GetLink(IExecutionContext, NormalizedPath, bool) string
Converts the specified path into a string appropriate for use as a link using default settings from the Wyam.Common.Configuration.IReadOnlySettings. This version should be used inside modules to ensure consistent link generation. Note that you can optionally include the host or not depending on if you want to generate host-specific links. By default, the host is not included so that sites work the same on any server including the preview server.
static
GetLink(IExecutionContext, NormalizedPath, string, DirectoryPath, bool, bool, bool) string
Converts the path into a string appropriate for use as a link, overriding one or more settings from the Wyam.Common.Configuration.IReadOnlySettings.
static
GetLink(IExecutionContext, NormalizedPath, string, DirectoryPath, bool, bool, bool, bool) string
Converts the path into a string appropriate for use as a link, overriding one or more settings from the Wyam.Common.Configuration.IReadOnlySettings.
static
GetLink(IExecutionContext, string, bool) string
Converts the specified path into a string appropriate for use as a link using default settings from the Wyam.Common.Configuration.IReadOnlySettings. This version should be used inside modules to ensure consistent link generation. Note that you can optionally include the host or not depending on if you want to generate host-specific links. By default, the host is not included so that sites work the same on any server including the preview server.
static
GetLink(IExecutionContext, string, string, DirectoryPath, bool, bool, bool) string
Converts the path into a string appropriate for use as a link, overriding one or more settings from the Wyam.Common.Configuration.IReadOnlySettings.
static
GitHub