···11+package types
22+33+const (
44+ BuildDir = "build"
55+ PagesDir = "pages"
66+ TemplatesDir = "templates"
77+ StaticDir = "static"
88+)
99+1010+type File interface {
1111+ Ext() string
1212+ // Render takes any arbitrary data and combines that with the global config,
1313+ // page frontmatter and the body, as template params. Templates are read
1414+ // from types.TemplateDir and the final html is written to dest,
1515+ // with necessary directories being created.
1616+ Render(dest string, data interface{}) error
1717+1818+ // Frontmatter will not be populated if Render hasn't been called.
1919+ Frontmatter() map[string]string
2020+ // Body will not be populated if Render hasn't been called.
2121+ Body() string
2222+ Basename() string
2323+}
2424+2525+// Only used for building indexes and Atom feeds
2626+type Post struct {
2727+ Meta map[string]string
2828+ // HTML-formatted body of post
2929+ Body string
3030+}