Now support for config files as yaml, json or toml

This commit is contained in:
spf13
2013-07-11 22:04:57 -04:00
parent d9b5f9cd9e
commit 75a2e6d4e8
5 changed files with 146 additions and 42 deletions

View File

@@ -45,6 +45,7 @@ type SiteInfo struct {
Indexes *OrderedIndexList
Recent *Pages
LastChange time.Time
Title string
}
func (s *Site) getFromIndex(kind string, name string) Pages {
@@ -163,7 +164,7 @@ func (s *Site) initialize() {
filepath.Walk(s.c.GetAbsPath(s.c.SourceDir), walker)
s.Info = SiteInfo{BaseUrl: template.URL(s.c.BaseUrl)}
s.Info = SiteInfo{BaseUrl: template.URL(s.c.BaseUrl), Title: s.c.Title}
s.Shortcodes = make(map[string]ShortcodeFunc)
}
@@ -308,7 +309,7 @@ func (s *Site) RenderLists() {
func (s *Site) RenderHomePage() {
n := s.NewNode()
n.Title = ""
n.Title = n.Site.Title
n.Url = Urlize(string(n.Site.BaseUrl))
n.RSSlink = template.HTML(MakePermalink(string(n.Site.BaseUrl), string("/index.xml")))
n.Permalink = template.HTML(string(n.Site.BaseUrl))