Refactor Permalink to private function

This will allow for reuse of this particular function.
This commit is contained in:
Noah Campbell
2013-10-02 19:33:51 -04:00
parent 6fa6f69a4a
commit 06da609138
2 changed files with 15 additions and 7 deletions

View File

@@ -551,14 +551,14 @@ func (s *Site) render(d interface{}, out string, layouts ...string) (err error)
section := ""
page, ok := d.(*Page)
if ok {
section = page.Section
section, _ = page.Permalink()
}
fmt.Println("Section is:", section)
transformer := transform.NewChain(
&transform.NavActive{Section: section},
&transform.AbsURL{BaseURL: s.Config.BaseUrl},
&transform.NavActive{Section: section},
)
renderReader, renderWriter := io.Pipe()