Documentation ¶
Index ¶
- Constants
- Variables
- func Build()
- func Run(addr string)
- type Artic
- type ArticleBase
- type ArticleConfig
- type ByDate
- type Category
- type CustomError
- type CustomPage
- type MonthArchive
- type MonthArchives
- type NavConfig
- type RenderFactory
- func (self *RenderFactory) PreProcessPosts(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) Render(root string)
- func (self *RenderFactory) RenderArchives(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) RenderCategories(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) RenderIndex(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) RenderPages(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) RenderPosts(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) RenderRss(root string, yamls map[string]interface{}) error
- func (self *RenderFactory) RenderTag(root string, yamls map[string]interface{}) error
- type Rss
- type RssConfig
- type Tag
- type TagConfig
- type YamlParser
- type YearArchive
- type YearArchives
Constants ¶
View Source
const ( INDEX_TPL = "index" TAG_TPL = "tag" POSTS_TPL = "posts" PAGES_TPL = "pages" RSS_TPL = "rss" CATEGORY_TPL = "category" ARCHIVE_TPL = "archive" )
View Source
const ( POST_DIR = "posts" PUBLICSH_DIR = "publish" )
View Source
const ( COMMON_HEADER_FILE = "header.tpl" COMMON_FOOTER_FILE = "footer.tpl" )
View Source
const (
RENDER_DIR = "./root"
)
Variables ¶
View Source
var ( NEWLY_ARTICLES_COUNT = 6 INDEX_ARTICLES_SHOW_COUNT = 15 )
View Source
var YAML_FILES = [3]string{"config.yml", "pages.yml", "nav.yml"}
Functions ¶
Types ¶
type Artic ¶
type Artic []*ArticleConfig
type ArticleBase ¶
type ArticleConfig ¶
type Category ¶
type Category struct { Name string Articles []ArticleBase Length int }
type CustomError ¶
type CustomError struct {
// contains filtered or unexported fields
}
func (*CustomError) Error ¶
func (e *CustomError) Error() string
type CustomPage ¶
type MonthArchive ¶
type MonthArchive struct { Month string Articles []*ArticleBase // contains filtered or unexported fields }
type MonthArchives ¶
type MonthArchives []*MonthArchive
func (MonthArchives) Len ¶
func (m MonthArchives) Len() int
func (MonthArchives) Less ¶
func (m MonthArchives) Less(i, j int) bool
func (MonthArchives) Swap ¶
func (m MonthArchives) Swap(i, j int)
type RenderFactory ¶
type RenderFactory struct{}
func (*RenderFactory) PreProcessPosts ¶
func (self *RenderFactory) PreProcessPosts(root string, yamls map[string]interface{}) error
pre process posts pages
func (*RenderFactory) Render ¶
func (self *RenderFactory) Render(root string)
func (*RenderFactory) RenderArchives ¶
func (self *RenderFactory) RenderArchives(root string, yamls map[string]interface{}) error
render archive
func (*RenderFactory) RenderCategories ¶
func (self *RenderFactory) RenderCategories(root string, yamls map[string]interface{}) error
render categories
func (*RenderFactory) RenderIndex ¶
func (self *RenderFactory) RenderIndex(root string, yamls map[string]interface{}) error
func (*RenderFactory) RenderPages ¶
func (self *RenderFactory) RenderPages(root string, yamls map[string]interface{}) error
render custom pages
func (*RenderFactory) RenderPosts ¶
func (self *RenderFactory) RenderPosts(root string, yamls map[string]interface{}) error
render posts pages
type Tag ¶
type Tag struct { Name string Articles []ArticleBase Length int }
type YamlParser ¶
type YamlParser struct{}
type YearArchive ¶
type YearArchive struct { Year string Months []*MonthArchive // contains filtered or unexported fields }
type YearArchives ¶
type YearArchives []*YearArchive
func (YearArchives) Len ¶
func (y YearArchives) Len() int
func (YearArchives) Less ¶
func (y YearArchives) Less(i, j int) bool
func (YearArchives) Swap ¶
func (y YearArchives) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.