ref: c8c6f5d05bd3952014d53e0f05f3b59797868943
parent: d774b142e8e702ac8d03bfecd13ce3f8d82b476c
author: Bjørn Erik Pedersen <[email protected]>
date: Sun Mar 6 09:10:06 EST 2016
Add json mime extension type
--- a/commands/server.go
+++ b/commands/server.go
@@ -30,6 +30,7 @@
"github.com/spf13/hugo/hugofs"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
+ "mime"
)
var (
@@ -94,6 +95,8 @@
serverCmd.Flags().String("memstats", "", "log memory usage to this file")
serverCmd.Flags().Int("meminterval", 100, "interval to poll memory usage (requires --memstats)")
serverCmd.RunE = server
+
+ mime.AddExtensionType(".json", "application/json; charset=utf8")
}
func server(cmd *cobra.Command, args []string) error {