diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-03-06 14:10:06 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-03-06 14:10:06 +0100 |
commit | c8c6f5d05bd3952014d53e0f05f3b59797868943 (patch) | |
tree | 9d15d6857d875b110bb0c69da3aebdbcfede4f25 /commands/server.go | |
parent | d774b142e8e702ac8d03bfecd13ce3f8d82b476c (diff) |
Add json mime extension type
Diffstat (limited to 'commands/server.go')
-rw-r--r-- | commands/server.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/server.go b/commands/server.go index 6007d9fe2..124541b90 100644 --- a/commands/server.go +++ b/commands/server.go @@ -30,6 +30,7 @@ import ( "github.com/spf13/hugo/hugofs" jww "github.com/spf13/jwalterweatherman" "github.com/spf13/viper" + "mime" ) var ( @@ -94,6 +95,8 @@ func init() { 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 { |