RenderMarkdown Class
Parses markdown content and renders it to HTML.
Namespace
Statiq.Markdown
Interfaces
Base Types
graph BT Type-->Base0["ParallelModule"] click Base0 "/api/Statiq.Common/ParallelModule" Base0-->Base1["Module"] click Base1 "/api/Statiq.Common/Module" Base1-->Base2["object"] Type-.->Interface0["IModule"] click Interface0 "/api/Statiq.Common/IModule" Type-.->Interface1["IParallelModule"] click Interface1 "/api/Statiq.Common/IParallelModule" Type["RenderMarkdown"] class Type type-node

Syntax

public class RenderMarkdown : ParallelModule, IModule, IParallelModule

Remarks

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.

Constructors

Name Summary
RenderMarkdown() Processes Markdown in the content of the document.
RenderMarkdown(string, string) Processes Markdown in the metadata of the document.

Properties

Name Property Type Summary
Parallel bool
Indicates whether documents will be processed by this module in parallel.
Inherited from ParallelModule

Methods

Name Return Value Summary
AfterExecution(IExecutionContext, ExecutionOutputs) void
Called after each module execution.
Inherited from Module
AfterExecutionAsync(IExecutionContext, ExecutionOutputs) Task
Called after each module execution.
Inherited from Module
BeforeExecution(IExecutionContext) void
Called before each module execution.
Inherited from Module
BeforeExecutionAsync(IExecutionContext) Task
Called before each module execution.
Inherited from Module
EscapeAt(bool) RenderMarkdown
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 \@.
ExecuteAsync(IExecutionContext) Task<IEnumerable<IDocument>>
This should not be called directly, instead call IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
ExecuteContextAsync(IExecutionContext) Task<IEnumerable<IDocument>>
Executes the module once for all input documents.
Inherited from ParallelModule
ExecuteInputAsync(IDocument, IExecutionContext) Task<IEnumerable<IDocument>>
Finally(IExecutionContext) void
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
FinallyAsync(IExecutionContext) Task
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
PassThroughRawFence(bool) RenderMarkdown
Specifies whether code fences with a language of "raw" (I.e. ```raw) should be passed through verbatim (the default is true).
PrependLinkRoot(bool) RenderMarkdown
Specifies if the 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 LinkRoot setting value is added before the link.
UseConfiguration(string) RenderMarkdown
Includes a set of extensions defined as a string, e.g., "pipetables", "citations", "mathematics", or "abbreviations". Separate different extensions with a '+'.
UseExtension<TExtension>() RenderMarkdown
Includes a custom extension in the markdown processing given by a class implementing the IMarkdownExtension interface.
UseExtension<TExtension>(TExtension) RenderMarkdown
Includes a custom extension in the markdown processing given by a object implementing the IMarkdownExtension interface.
UseExtensions() RenderMarkdown
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>) RenderMarkdown
Includes multiple custom extension in the markdown processing given by classes implementing the IMarkdownExtension interface.
WithMarkdownDocumentKey(string) RenderMarkdown
Specifies a metadata key where the MarkdownDocument should be saved (by default to MarkdownDocument).

Extension Methods