webpage

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 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 Script

type Script struct {
	Src        string
	Content    string
	Head       bool
	Attributes []html.Attribute
}

type Style

type Style struct {
	Content    string
	Attributes []html.Attribute
}

type Webpage

type Webpage struct {
	Meta        [][]html.Attribute
	Links       [][]html.Attribute
	Styles      []Style
	Scripts     []Script
	Robots      string
	Viewport    string
	Charset     string
	Title       string
	Description string
	Author      string
	// contains filtered or unexported fields
}

func NewWebpage

func NewWebpage(inputHTML io.Reader) (webpage *Webpage, err error)

func (*Webpage) AddGA

func (webpage *Webpage) AddGA(gaID string)

func (*Webpage) AddGTM

func (webpage *Webpage) AddGTM(gtmID string)

func (*Webpage) AddJavaScriptRedirect

func (webpage *Webpage) AddJavaScriptRedirect(redirectURI string)

func (*Webpage) AddJavaScriptVariable

func (webpage *Webpage) AddJavaScriptVariable(name string, value interface{}) (err error)

func (*Webpage) Clone

func (webpage *Webpage) Clone() (*Webpage, error)

func (*Webpage) SetRedirect

func (webpage *Webpage) SetRedirect(redirectURI string)

func (*Webpage) WriteToBuffer

func (webpage *Webpage) WriteToBuffer(outputHTML *bytes.Buffer) (err error)

func (*Webpage) WriteToBytes

func (webpage *Webpage) WriteToBytes() (outputHTML []byte, err error)

Jump to

Keyboard shortcuts

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