Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct {
Title Property `validate:"required"`
ObjectType ObjectType `validate:"required"`
URL Property `validate:"required"`
Image Property `validate:"required"`
Description Property
}
Metadata represents the default opengraph metadata properties used by the app on pages.
func NewMetadata ¶
NewMetadata creates a new opengraph Metadata object with properties set to values given by the options. Where a property is not set by an option, a default value will be used.
type ObjectType ¶ added in v0.49.0
type Option ¶
type Option func(*Metadata)
func WithDescription ¶
WithDescription option sets a custom og:desc property with optional element attributes. If this option is not used a default description will be set.
func WithImage ¶
WithImage option sets a custom og:image property with optional element attributes. If this option is not used a default image will be set.
func WithTitle ¶
WithTitle option sets a custom og:title property with optional element attributes. If this option is not used a default title will be set.