mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Refactor Permalink to private function
This will allow for reuse of this particular function.
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user