page

package
v0.0.0-...-712f093 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2015 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeAttribute

func NodeAttribute(node *html.Node, attr string) string

func NodeHtml

func NodeHtml(node *html.Node) template.HTML

func NodeText

func NodeText(node *html.Node) string

Types

type Page

type Page struct {
	// contains filtered or unexported fields
}

func NewPage

func NewPage(uri string) *Page

func NewPageWithData

func NewPageWithData(uri string, data interface{}) (*Page, error)

func (*Page) Author

func (page *Page) Author() string

func (*Page) Body

func (page *Page) Body() *html.Node

func (*Page) Contact

func (page *Page) Contact() string

func (*Page) Description

func (page *Page) Description() string

func (*Page) GetData

func (page *Page) GetData() interface{}

func (*Page) Load

func (page *Page) Load(path string) error

func (*Page) Markdown

func (page *Page) Markdown() string

func (*Page) Meta

func (page *Page) Meta(key string) interface{}

func (*Page) ModifyDatetime

func (page *Page) ModifyDatetime() time.Time

func (*Page) PublishedDatetime

func (page *Page) PublishedDatetime() time.Time

func (*Page) SetData

func (page *Page) SetData(data interface{}) error

func (*Page) Summary

func (page *Page) Summary(max int) string

func (*Page) TagClass

func (page *Page) TagClass(class string) *html.Node

func (*Page) TagClassAll

func (page *Page) TagClassAll(class string) []*html.Node

func (*Page) TagID

func (page *Page) TagID(id string) *html.Node

func (*Page) TagIDAll

func (page *Page) TagIDAll(id string) []*html.Node

func (*Page) TagName

func (page *Page) TagName(name string) *html.Node

func (*Page) TagNameAll

func (page *Page) TagNameAll(name string) []*html.Node

func (*Page) Template

func (page *Page) Template() string

func (*Page) Title

func (page *Page) Title() string

func (*Page) URI

func (page *Page) URI() string

type PageSort

type PageSort struct {
	Field  string
	Ascend bool
	Pages  []*Page
}

func (PageSort) Len

func (ps PageSort) Len() int

func (PageSort) Less

func (ps PageSort) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j.

func (PageSort) Swap

func (ps PageSort) Swap(i, j int)

Swap swaps the elements with indexes i and j.

Jump to

Keyboard shortcuts

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