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:
Noah Campbell
2013-11-05 22:28:06 +00:00
parent 1cebce12ad
commit 86233c00a0
9 changed files with 68 additions and 137 deletions

View File

@@ -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