mirror of
https://github.com/AssetRipper/AssetRipper.Text.Html.git
synced 2026-11-13 20:05:44 -10:00
2.1.0
AssetRipper.Text.Html
A fast, NativeAOT-compatible library for writing minified HTML with C#. Although the output is not forever guaranteed to be valid XHTML, it currently is.
Justification
ASP.NET does not currently support native compilation for Razor Pages.
API Styles
We offer two styles of using the library:
//Fluent API
new Img(writer).WithSrc("www.example.com").Close();
using (new A(writer).WithClass("btn").End())
{
//Inner content
}
//Initialization API
new Img(writer) { Src = "www.example.com" }.Close();
using (new A(writer) { Class = "btn" }.End())
{
//Inner content
}
End and Close
These two methods are required to conclude an html element constructor call. End is for normal elements, and Close is for self-closed elements.
References
Description
A library for creating HTML content with C#.
321 KiB
0 Stars
1 Watchers
0 Forks