mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Add ContentTypes to config
This is an empty struct for now, but we will most likely expand on that. ``` [contentTypes] [contentTypes.'text/markdown'] ``` The above means that only Markdown will be considered a content type. E.g. HTML will be treated as plain text. Fixes #12274
This commit is contained in:
@@ -107,7 +107,7 @@ func (c ReplacingJSONMarshaller) MarshalJSON() ([]byte, error) {
|
||||
var removeZeroVAlues func(m map[string]any)
|
||||
removeZeroVAlues = func(m map[string]any) {
|
||||
for k, v := range m {
|
||||
if !hreflect.IsTruthful(v) {
|
||||
if !hreflect.IsMap(v) && !hreflect.IsTruthful(v) {
|
||||
delete(m, k)
|
||||
} else {
|
||||
switch vv := v.(type) {
|
||||
|
Reference in New Issue
Block a user