Add all config to docshelper.json

Also consolidate so the mediaTypes and outputFormats are listed once only.

Fixes #11328
This commit is contained in:
Bjørn Erik Pedersen 2023-08-07 10:52:52 +02:00
parent d4a6c16c17
commit 851bf3515e
15 changed files with 1023 additions and 770 deletions

View file

@ -15,8 +15,6 @@ package minifiers
import (
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/docshelper"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cast"
"github.com/mitchellh/mapstructure"
@ -113,10 +111,3 @@ func DecodeConfig(v any) (conf MinifyConfig, err error) {
return
}
func init() {
docsProvider := func() docshelper.DocProvider {
return docshelper.DocProvider{"config": map[string]any{"minify": parser.LowerCaseCamelJSONMarshaller{Value: defaultConfig}}}
}
docshelper.AddDocProviderFunc(docsProvider)
}