Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<title") TagClose = []byte("</title>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new title element with text content Example: title.New() Renders: <title></title>
func RawText ¶
func RawText(content string) *element
RawText Creates a new title element with raw text content. Uses text.RawText which is not HTML-escaped. Example: title.RawText("Page & Title") Renders: <title>Page & Title</title>
func RawTextf ¶
RawTextf Creates a new title element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: title.RawTextf("%s — My App", page) Renders: <title>Home — My App</title>
func Static ¶
func Static(content string) *element
Static Creates a new title element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: title.Static("Dashboard") Renders: <title>Dashboard</title>