hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 7fba250023694cd5ff74ab28955c94d874ae795d
parent 4dcf734acd095654e5c0c64d7c8def8b51813deb
Author: spf13 <steve.francia@gmail.com>
Date:   Tue,  4 Nov 2014 00:42:36 -0500

Adding a proper css file handler (with automatic minification)

Diffstat:
Mhugolib/handler_file.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hugolib/handler_file.go b/hugolib/handler_file.go
@@ -14,8 +14,8 @@
 package hugolib
 
 import (
-	"fmt"
-	_ "github.com/dchest/cssmin"
+	"github.com/dchest/cssmin"
+	"github.com/spf13/hugo/helpers"
 	"github.com/spf13/hugo/source"
 )
 
@@ -29,7 +29,7 @@ var css = Handle{
 		results <- HandledResult{file: f}
 	},
 	fileConvert: func(f *source.File, s *Site, results HandleResults) {
-
-		fmt.Println(f.Path())
+		x := cssmin.Minify(f.Bytes())
+		s.WriteDestFile(f.Path(), helpers.BytesToReader(x))
 	},
 }