metadata

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alternate

type Alternate struct {
	Title    string
	Href     string
	HrefLang string
	Type     string
	Media    string
}

type Author

type Author struct {
	Name string
	URL  string
}

type Metadata

type Metadata struct {
	Base            *url.URL
	Title           string
	Description     string
	Generator       string
	ApplicationName string
	Referrer        string
	Keywords        []string
	Authors         []Author
	Creator         string
	Publisher       string
	Canonical       string
	Alternates      []Alternate
	Robots          *Robots
	OpenGraph       *OpenGraph
	Twitter         *Twitter
}

func (*Metadata) Node

func (m *Metadata) Node() html.Node

type OpenGraph

type OpenGraph struct {
	Title       string
	Description string
	URL         string
	SiteName    string
	Locale      string
	Type        string
	Images      []OpenGraphMedia
	Videos      []OpenGraphMedia
	Audio       []OpenGraphMedia
}

func (*OpenGraph) Node

func (o *OpenGraph) Node() html.Node

type OpenGraphMedia

type OpenGraphMedia struct {
	URL    string
	Width  int
	Height int
	Alt    string
}

type Robots

type Robots struct {
	Index   bool
	Follow  bool
	Nocache bool
	Other   map[string]map[string]any
}

func (*Robots) Node

func (r *Robots) Node() html.Node

type Twitter

type Twitter struct {
	Card        string
	Title       string
	Description string
	SiteID      string
	Creator     string
	CreatorID   string
	Images      []string
}

func (*Twitter) Node

func (t *Twitter) Node() html.Node

Jump to

Keyboard shortcuts

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