mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Remove the hugo-nav function
Remove the hugo-nav since it relied on a slow library. The current build reimplements the absurl functionality based on string replace. Discovered that my prior implementation missed the requirement for making absolute paths (/path) absolute with the host, whereas a relative path is left untouched. Updated the test cases to support this if this is reimplemented.
This commit is contained in:
@@ -576,19 +576,11 @@ func (s *Site) render(d interface{}, out string, layouts ...string) (err error)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
section := ""
|
||||
if page, ok := d.(*Page); ok {
|
||||
section, _ = page.RelPermalink()
|
||||
}
|
||||
|
||||
absURL, err := transform.AbsURL(s.Config.BaseUrl)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
transformer := transform.NewChain(
|
||||
append(absURL, transform.NavActive(section, "hugo-nav")...)...,
|
||||
)
|
||||
transformer := transform.NewChain(absURL...)
|
||||
|
||||
var renderBuffer *bytes.Buffer
|
||||
|
||||
|
Reference in New Issue
Block a user