While Wyam is certainly still usable, it's been rebranded and rebooted as Statiq with a ton of improvements. You almost certainly want to look there unless you're already a Wyam user.

Less Wyam.Less

Compiles Less CSS files to CSS stylesheets.
The content of the input document is compiled to CSS and the content of the output document contains the compiled CSS stylesheet.


This module exists in the Wyam.Less package which is not part of the core distribution. Add the following preprocessor directive to your configuration file to use it:
#n Wyam.Less


This is a pipeline that compiles two Less CSS files, one for Bootstrap (which contains a lot of includes) and a second for custom CSS.


  • Less()

Fluent Methods

Chain these methods together after the constructor to modify behavior.

  • WithInputPath(DocumentConfig inputPath)

    Specifies a delegate that should be used to get the input path for each input document. This allows the Sass processor to search the right file system and paths for include files. By default, the Wyam.Common.Meta.Keys.RelativeFilePath metadata value is used for the input document path.

    • inputPath

      A delegate that should return a Wyam.Common.IO.FilePath.

Input Metadata

The metadata values listed below apply to individual documents and are typically set from front matter (with just the name of the key) and used as inputs to the module to control behavior.

  • Keys.RelativeFilePath: Wyam.Common.IO.FilePath

    The path to the file relative to the input folder. This metadata value is used when generating links to the document.

Output Metadata

The metadata values listed below apply to individual documents and are created and set by the module as indicated in their descriptions.

  • Keys.RelativeFilePath: Wyam.Common.IO.FilePath

    Relative path to the output CSS (or map) file.

  • Keys.WritePath: Wyam.Common.IO.FilePath

    The path to use when writing the file.