Documentation
¶
Index ¶
Constants ¶
View Source
const ( NodeTypePage = "page" NodeTypePost = "post" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateCommand ¶
type CreateCommand struct{}
func (*CreateCommand) ArgDesc ¶
func (cmd *CreateCommand) ArgDesc() string
func (*CreateCommand) Help ¶
func (cmd *CreateCommand) Help() string
type ListPage ¶
type ListPage struct {
Current *baja.Current
Title string
Permalink string
Nodes []map[string]interface{}
}
ListPage is an index page, it isn't constructed from a markdown file but from a list of related markdown such as tag or category
type Node ¶
type Node struct {
Meta *NodeMeta
Body template.HTML
Raw string // raw text content
Path string // full absolute path to markdown file
BaseDirectory string // the directory without /content part
Name string // the filename without extension
// contains filtered or unexported fields
}
Node hold information of a specifc page we are rendering
type NodeDB ¶
NodeDB is the in-memory database of all the page
func BuildDB ¶
BuildDB calculate a tree to represent all of node This tree can be query/group/filter
func (*NodeDB) ByCategory ¶
ByTag category groups node by category(category is the directoy name)
func (*NodeDB) Publishable ¶
Publishable returns a list of node that can be publish, as in non-draft mode or non page
type NodeMeta ¶
type NodeMeta struct {
Title string
Draft bool
Date time.Time
DateFormatted string
Tags []string
Category string
Type string // node type. Eg page or post
Theme string // a custom template file inside theme directory without extension
}
NodeMeta is meta data of a node, usually map directly to node toml metadata section
Click to show internal directories.
Click to hide internal directories.