mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
@@ -71,14 +71,14 @@ type Options struct {
|
||||
Inject []string
|
||||
|
||||
// User defined symbols.
|
||||
Defines map[string]interface{}
|
||||
Defines map[string]any
|
||||
|
||||
// Maps a component import to another.
|
||||
Shims map[string]string
|
||||
|
||||
// User defined params. Will be marshaled to JSON and available as "@params", e.g.
|
||||
// import * as params from '@params';
|
||||
Params interface{}
|
||||
Params any
|
||||
|
||||
// What to use instead of React.createElement.
|
||||
JSXFactory string
|
||||
@@ -106,7 +106,7 @@ type Options struct {
|
||||
tsConfig string
|
||||
}
|
||||
|
||||
func decodeOptions(m map[string]interface{}) (Options, error) {
|
||||
func decodeOptions(m map[string]any) (Options, error) {
|
||||
var opts Options
|
||||
|
||||
if err := mapstructure.WeakDecode(m, &opts); err != nil {
|
||||
@@ -269,7 +269,7 @@ func createBuildPlugins(c *Client, opts Options) ([]api.Plugin, error) {
|
||||
params := opts.Params
|
||||
if params == nil {
|
||||
// This way @params will always resolve to something.
|
||||
params = make(map[string]interface{})
|
||||
params = make(map[string]any)
|
||||
}
|
||||
|
||||
b, err := json.Marshal(params)
|
||||
|
Reference in New Issue
Block a user