Markdown Class


Parses markdown content and renders it to HTML.
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IModule"] click Interface0 "/api/Wyam.Common.Modules/IModule" Type["Markdown"] class Type type-node


public class Markdown : IModule


Parses markdown content in each input document and outputs documents with rendered HTML content. Note that @ (at) symbols will be automatically HTML escaped for better compatibility with downstream Razor modules. If you want to include a raw @ symbol when EscapeAt() is true, use \@. Use the EscapeAt() fluent method to modify this behavior.


Name Summary
Markdown() Processes Markdown in the content of the document.
Markdown(string, string) Processes Markdown in the metadata of the document. The rendered HTML will be placed


Name Constant Value Summary
DefaultConfiguration common
The default Markdown configuration.


Name Value Summary
EscapeAt(bool) Markdown
Specifies whether the @ symbol should be escaped (the default is true). This is important if the Markdown documents are going to be passed to the Razor module, otherwise the Razor processor will interpret the unescaped @ symbols as code directives. If you want to include a raw @ symbol when EscapeAt() is true, use \@.
Execute(IReadOnlyList<IDocument>, IExecutionContext) IEnumerable<IDocument>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
PrependLinkRoot(bool) Markdown
Specifies if the Wyam.Common.Meta.Keys.LinkRoot setting must be used to rewrite root-relative links when rendering markdown. By default, root-relative links, which are links starting with a '/' are left untouched. When setting this value to true, the Wyam.Common.Meta.Keys.LinkRoot setting value is added before the link.
UseConfiguration(string) Markdown
Includes a set of extensions defined as a string, e.g., "pipetables", "citations", "mathematics", or "abbreviations". Separate different extensions with a '+'.
UseExtension<TExtension>() Markdown
Includes a custom extension in the markdown processing given by a class implementing the IMarkdownExtension interface.
UseExtension<TExtension>(TExtension) Markdown
Includes a custom extension in the markdown processing given by a object implementing the IMarkdownExtension interface.
UseExtensions() Markdown
Includes a set of useful advanced extensions, e.g., citations, footers, footnotes, math, grid-tables, pipe-tables, and tasks, in the Markdown processing pipeline.
UseExtensions(IEnumerable<Type>) Markdown
Includes multiple custom extension in the markdown processing given by classes implementing the Markdig.IMarkdownExtension interface.