Minifies the XML content.
This module takes the XML content and uses minification to reduce the output.
Package
This module exists in the Wyam.Minification package which is not part of the core distribution. Add the following preprocessor directive to your configuration file to use it:
#n Wyam.Minification
Examples
Pipelines.Add("Blog posts",
ReadFiles("posts/*.md"),
FrontMatter(Yaml()),
Markdown(),
WriteFiles(".html"),
Rss(siteUri: "http://example.org",
rssPath: new FilePath("posts/feed.rss"),
feedTitle: "My awesome blog",
feedDescription: "Blog about something"
),
MinifyXml(),
WriteFiles()
);
Usage
-
MinifyXml(bool useEmptyMinificationSettings = false)
Minifies the XML content.
useEmptyMinificationSettings
Boolean to specify whether to use empty minification settings. Default value is
false
, this will use commonly accepted settings.
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
RemoveXmlComments(bool removeXmlComments = true)
Flag for whether to remove all XML comments.
removeXmlComments
Default value is
true
.
-
WithSettings(Action<XmlMinificationSettings> action)
Updates the minification settings.
action
A function to update the minification settings with.