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

@@ -16,12 +16,10 @@ package markup_config
import (
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/docshelper"
"github.com/gohugoio/hugo/markup/asciidocext/asciidocext_config"
"github.com/gohugoio/hugo/markup/goldmark/goldmark_config"
"github.com/gohugoio/hugo/markup/highlight"
"github.com/gohugoio/hugo/markup/tableofcontents"
"github.com/gohugoio/hugo/parser"
"github.com/mitchellh/mapstructure"
)
@@ -108,10 +106,3 @@ var Default = Config{
Goldmark: goldmark_config.Default,
AsciidocExt: asciidocext_config.Default,
}
func init() {
docsProvider := func() docshelper.DocProvider {
return docshelper.DocProvider{"config": map[string]any{"markup": parser.LowerCaseCamelJSONMarshaller{Value: Default}}}
}
docshelper.AddDocProviderFunc(docsProvider)
}