Documentation ¶
Index ¶
- Variables
- func Build(input, output string, opt *Options)
- func BuildURL(root, path string) (string, error)
- func RegisterGenerator(name string, gen Generator)
- func XMLDate(t time.Time) string
- type Collectable
- type Content
- type ContentInfo
- type ContentSlice
- type Dir
- type File
- type Generator
- type HTMLDocument
- type M
- type Options
- type Post
- type TextDocument
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIgnore = errors.New("grout: ignore content")
ErrIgnore is specially handled to allow generation to proceed
Functions ¶
func RegisterGenerator ¶
Types ¶
type Collectable ¶
type Content ¶
type Content interface { IsDir() bool FullPath() string Path() string Read(data M) error Write(dir, cachedir string, data M) error }
func GeneratePost ¶
func GeneratePost(sitecfg, cfg M, info ContentInfo) (Content, error)
type ContentInfo ¶
func (ContentInfo) FullPath ¶
func (c ContentInfo) FullPath() string
func (ContentInfo) Path ¶
func (c ContentInfo) Path() string
func (*ContentInfo) SetFullPath ¶
func (c *ContentInfo) SetFullPath(p string)
func (*ContentInfo) SetPath ¶
func (c *ContentInfo) SetPath(p string)
type ContentSlice ¶
type ContentSlice []Content
func (ContentSlice) Len ¶
func (c ContentSlice) Len() int
func (ContentSlice) Less ¶
func (c ContentSlice) Less(i, j int) bool
func (ContentSlice) Swap ¶
func (c ContentSlice) Swap(i, j int)
type Dir ¶
type Dir struct {
ContentInfo
}
type File ¶
type File struct {
ContentInfo
}
type HTMLDocument ¶
type HTMLDocument struct { ContentInfo FrontMatter M Template *template.Template }
func (*HTMLDocument) Read ¶
func (d *HTMLDocument) Read(data M) error
type Post ¶
type Post struct { *HTMLDocument // contains filtered or unexported fields }
func (*Post) Less ¶
func (p *Post) Less(other Collectable) bool
type TextDocument ¶
type TextDocument struct { ContentInfo FrontMatter M Template *template.Template }
func (*TextDocument) Read ¶
func (d *TextDocument) Read(data M) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.