@
(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.
Package
#n Wyam.Markdown
Usage
-
Markdown()
Processes Markdown in the content of the document.
-
Markdown(string sourceKey, string destinationKey = null)
Processes Markdown in the metadata of the document. The rendered HTML will be placed
sourceKey
The metadata key of the Markdown to process.
destinationKey
The metadata key to store the rendered HTML (if null, it gets placed back in the source metadata key).
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
EscapeAt(bool escapeAt = true)
Specifies whether the
@
symbol should be escaped (the default istrue
). 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 whenEscapeAt()
istrue
, use\@
.escapeAt
If set to
true
,@
symbols are HTML escaped.
-
PrependLinkRoot(bool prependLinkRoot = false)
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 totrue
, theWyam.Common.Meta.Keys.LinkRoot
setting value is added before the link.prependLinkRoot
If set to
true
, theWyam.Common.Meta.Keys.LinkRoot
setting value is added before any root-relative link (eg. stating with a '/').
-
UseConfiguration(string extensions)
Includes a set of extensions defined as a string, e.g., "pipetables", "citations", "mathematics", or "abbreviations". Separate different extensions with a '+'.
extensions
The extensions string.
-
UseExtension<TExtension>() where TExtension : class, IMarkdownExtension, new()
Includes a custom extension in the markdown processing given by a class implementing the IMarkdownExtension interface.
-
UseExtension<TExtension>(TExtension extension) where TExtension : IMarkdownExtension
Includes a custom extension in the markdown processing given by a object implementing the IMarkdownExtension interface.
extension
A object that that implement
Markdig.IMarkdownExtension
.
-
UseExtensions()
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> extensions)
Includes multiple custom extension in the markdown processing given by classes implementing the
Markdig.IMarkdownExtension
interface.extensions
A sequence of types that implement
Markdig.IMarkdownExtension
.