link

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Icon

func Icon(href string) *element

Icon Creates a new link element for a site icon (favicon). Example: link.Icon("/favicon.ico") Renders: <link rel="icon" href="/favicon.ico" />

func New

func New() *element

New Creates a new link element without any initial attributes. Example: link.New() Renders: <link />

func Preload

func Preload(href string, as as.As) *element

Preload Creates a new link element for preloading resources to improve performance. Example: link.Preload("/font.woff2", as.Font) Renders: <link rel="preload" href="/font.woff2" as="font" />

func Stylesheet

func Stylesheet(href string) *element

Stylesheet Creates a new link element for a CSS stylesheet. Example: link.Stylesheet("/styles.css") Renders: <link rel="stylesheet" href="/styles.css" />

Types

type Element

type Element = element

Element is an exported alias for the private element type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL