mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
Add json mime extension type
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
|||||||
"github.com/spf13/hugo/hugofs"
|
"github.com/spf13/hugo/hugofs"
|
||||||
jww "github.com/spf13/jwalterweatherman"
|
jww "github.com/spf13/jwalterweatherman"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
"mime"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -94,6 +95,8 @@ func init() {
|
|||||||
serverCmd.Flags().String("memstats", "", "log memory usage to this file")
|
serverCmd.Flags().String("memstats", "", "log memory usage to this file")
|
||||||
serverCmd.Flags().Int("meminterval", 100, "interval to poll memory usage (requires --memstats)")
|
serverCmd.Flags().Int("meminterval", 100, "interval to poll memory usage (requires --memstats)")
|
||||||
serverCmd.RunE = server
|
serverCmd.RunE = server
|
||||||
|
|
||||||
|
mime.AddExtensionType(".json", "application/json; charset=utf8")
|
||||||
}
|
}
|
||||||
|
|
||||||
func server(cmd *cobra.Command, args []string) error {
|
func server(cmd *cobra.Command, args []string) error {
|
||||||
|
Reference in New Issue
Block a user