Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<article") TagClose = []byte("</article>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new article element with optional child nodes Example: article.New() Renders: <article></article>
func RawText ¶
func RawText(str string) *element
RawText Creates a new article element with raw text content. Uses text.RawText which is not HTML-escaped. Example: article.RawText("<h2>Title</h2><p>Content</p>") Renders: <article><h2>Title</h2><p>Content</p></article>
func RawTextf ¶
RawTextf Creates a new article element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: article.RawTextf("<h2>%s</h2>", headline) Renders: <article><h2>Breaking News</h2></article>
func Static ¶
func Static(str string) *element
Static Creates a new article element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: article.Static("Breaking News") Renders: <article>Breaking News</article>