Minifies the HTML content.
- Namespace
- Statiq
.Minification - Interfaces
- Base Types
-
- object
- MinifierBase
graph BT
Type-->Base0["MinifierBase"]
click Base0 "/api/Statiq.Minification/MinifierBase"
Base0-->Base1["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type["MinifyHtml"]
class Type type-node
Syntax
public class MinifyHtml : MinifierBase, IModule
Examples
Pipelines.Add("Content",
ReadFiles("*.md"),
FrontMatter(Yaml()),
Markdown(),
Razor(),
MinifyHtml(),
WriteFiles(".html")
);
Remarks
This module takes the HTML content and uses minification to reduce the output.
Constructors
Name | Summary |
---|---|
MinifyHtml |
Minifies the HTML content. |
Methods
Name | Return Value | Summary |
---|---|---|
EmptyTagRenderMode |
MinifyHtml |
Render mode of HTML empty tag. Can take the following values:
|
ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
|
MinifyAsync |
Task |
Inherited from MinifierBase
|
RemoveHtmlComments |
MinifyHtml |
Flag for whether to remove all HTML comments, except conditional, noindex, KnockoutJS containerless comments and AngularJS comment directives.
|
Remove |
MinifyHtml |
Flag for whether to remove optional end tags (
html , head , body , p , li , dt , dd , rt , rp , optgroup , option , colgroup , thead , tfoot , tbody , tr , th and td ).
|
Remove |
MinifyHtml |
Flag for whether to remove tags without content, except for
textarea , tr , th and td tags, and tags with class , id , name , role , src and data-* attributes.
|
WithSettings |
MinifyHtml |
Updates the minification settings.
|