Documentation
¶
Index ¶
- func Author(content string) *element
- func Charset(charset charset.Charset) *element
- func Description(content string) *element
- func Keywords(content string) *element
- func New() *element
- func OG(property string, content string) *element
- func Refresh(seconds int, url string) *element
- func Robots(content string) *element
- func UTF8() *element
- func Viewport(content string) *element
- type Element
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Author ¶
func Author(content string) *element
Author Creates a meta author element to identify the document's author. Example: meta.Author("John Doe") Renders: <meta name="author" content="John Doe" />
func Charset ¶
Charset Creates a new meta element declaring character encoding. Example: meta.Charset(charset.Custom("custom")) Renders: <meta charset="custom" />
func Description ¶
func Description(content string) *element
Description Creates a meta description element for SEO and search engine snippets. Example: meta.Description("Page description") Renders: <meta name="description" content="Page description" />
func Keywords ¶
func Keywords(content string) *element
Keywords Creates a meta keywords element (largely deprecated for SEO). Example: meta.Keywords("html, css, javascript") Renders: <meta name="keywords" content="html, css, javascript" />
func New ¶
func New() *element
New Creates a new meta element without any initial attributes. Example: meta.New() Renders: <meta />
func OG ¶
OG Creates a new meta element for Open Graph protocol properties (social media sharing). Example: meta.OG("title", "My Page Title") Renders: <meta content="My Page Title" property="title" />
func Refresh ¶
Refresh Creates a meta refresh element that automatically redirects after specified seconds. Example: meta.Refresh(5, "/new-page") Renders: <meta content="5; url=/new-page" httpequiv="refresh" />
func Robots ¶
func Robots(content string) *element
Robots Creates a meta robots element to control search engine crawling and indexing. Example: meta.Robots("index, follow") Renders: <meta name="robots" content="index, follow" />