Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentTree ¶
type ContentTree struct {
// contains filtered or unexported fields
}
func NewContentTree ¶
func (*ContentTree) Children ¶
func (content *ContentTree) Children() []Tree
func (*ContentTree) Name ¶
func (content *ContentTree) Name() string
func (*ContentTree) Path ¶
func (content *ContentTree) Path() string
type FrontMatter ¶
type FrontMatter struct { // Author of the page. Author string `json:"author"` // Title of the page. Title string `json:"title"` // Description is a short abstract of the page. Description string `json:"description"` // CreatedAt determines when the article was written. CreatedAt *frontmatter.SimpleDate `json:"created_at"` // Tags are list of words categorizing the page. Tags []string `json:"tags"` // Hidden excludes page from navigation menu. Hidden bool `json:"hidden"` }
FrontMatter stores metadata of a page.
type MenuEntry ¶
type MenuEntry struct { // Title of the menu entry. Title string // Path of the page file. Path string // IsDir is true if path is pointing to a directory. IsDir bool }
MenuEntry is an entry in the navigation menu.
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func (*Page) Frontmatter ¶
func (p *Page) Frontmatter() *FrontMatter
type Tree ¶
type Tree interface { // Children returns a list of subtrees, if any. Children() []Tree // Path retuns the full path, starting from root of the tree. Path() string // Name returns the name of the tree node. Name() string // Walk calls func for every node in the (sub-)tree. Walk(func(Tree) error) error }
Click to show internal directories.
Click to hide internal directories.