summaryrefslogtreecommitdiffstats
path: root/hugolib/handler_file.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/handler_file.go')
-rw-r--r--hugolib/handler_file.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/hugolib/handler_file.go b/hugolib/handler_file.go
index b0ea4fdd7..def0408a4 100644
--- a/hugolib/handler_file.go
+++ b/hugolib/handler_file.go
@@ -14,8 +14,9 @@
package hugolib
import (
+ "bytes"
+
"github.com/dchest/cssmin"
- "github.com/spf13/hugo/helpers"
"github.com/spf13/hugo/source"
"github.com/spf13/hugo/tpl"
)
@@ -48,6 +49,6 @@ type cssHandler struct{ basicFileHandler }
func (h cssHandler) Extensions() []string { return []string{"css"} }
func (h cssHandler) FileConvert(f *source.File, s *Site) HandledResult {
x := cssmin.Minify(f.Bytes())
- s.writeDestFile(f.Path(), helpers.BytesToReader(x))
+ s.writeDestFile(f.Path(), bytes.NewReader(x))
return HandledResult{file: f}
}