Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType int
ContentType blog or docs
const ( ContentTypeBlog ContentType = iota ContentTypeDocs )
List of content types
type FrontMatter ¶
FrontMatter is a metadata for Page
func (*FrontMatter) UnmarshalYAML ¶
func (fm *FrontMatter) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler interface
type IndexPage ¶
type IndexPage struct { PagerItem Path string Pages []*Page Next *PagerItem Prev *PagerItem Pager []*PagerItem }
IndexPage is a colleciton of pages with pagination info
type Page ¶
type Page struct { Content []byte Summary []byte Link string Name string Truncated bool Path string Draft bool Front *FrontMatter }
Page is a parsed page
type Site ¶
type Site struct { Pages []*Page IndexPages []*IndexPage TagPages map[string][]*IndexPage Tags TagSet // contains filtered or unexported fields }
Site is collection of content pages
func FromDir ¶
func FromDir(f *fs.FS, conf *config.SiteConfig, dir string, contentType ContentType) (*Site, error)
FromDir loads Site from given directory, recurcively
Click to show internal directories.
Click to hide internal directories.