add confirm
parent
489db64055
commit
6d3817d6ce
10
setup.go
10
setup.go
|
@ -6,6 +6,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/hacdias/caddy-filemanager"
|
"github.com/hacdias/caddy-filemanager"
|
||||||
|
@ -76,9 +77,18 @@ func setup(c *caddy.Controller) error {
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kind := reflect.TypeOf(f)
|
||||||
|
|
||||||
|
if kind == reflect.TypeOf(map[interface{}]interface{}{}) {
|
||||||
|
if val, ok := f.(map[interface{}]interface{})["metaDataFormat"]; ok {
|
||||||
|
format = val.(string)
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
if val, ok := f.(map[string]interface{})["metaDataFormat"]; ok {
|
if val, ok := f.(map[string]interface{})["metaDataFormat"]; ok {
|
||||||
format = val.(string)
|
format = val.(string)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Generates the Hugo website for the first time the plugin is activated.
|
// Generates the Hugo website for the first time the plugin is activated.
|
||||||
go RunHugo(conf, true)
|
go RunHugo(conf, true)
|
||||||
|
|
Loading…
Reference in New Issue