Change the order of Apply to be more Unixy

Typically the destination is on the left and the src is on the right.
This commit is contained in:
Noah Campbell
2013-10-01 14:42:08 -07:00
parent 94a3184ad0
commit 80009b427f
7 changed files with 13 additions and 10 deletions

View File

@@ -618,10 +618,13 @@ func (s *Site) WritePublic(path string, content io.Reader) (err error) {
}
if s.Transformer == nil {
s.Transformer = &transform.AbsURL{BaseURL: s.Config.BaseUrl}
s.Transformer = transform.NewChain(
&transform.AbsURL{BaseURL: s.Config.BaseUrl},
&transform.NavActive{Section: "tbd"},
)
}
final := new(bytes.Buffer)
s.Transformer.Apply(content, final)
s.Transformer.Apply(final, content)
return s.Target.Publish(path, final)
}