mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +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:
@@ -74,6 +74,16 @@ func IsTruthful(in any) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// IsMap reports whether v is a map.
|
||||
func IsMap(v any) bool {
|
||||
return reflect.ValueOf(v).Kind() == reflect.Map
|
||||
}
|
||||
|
||||
// IsSlice reports whether v is a slice.
|
||||
func IsSlice(v any) bool {
|
||||
return reflect.ValueOf(v).Kind() == reflect.Slice
|
||||
}
|
||||
|
||||
var zeroType = reflect.TypeOf((*types.Zeroer)(nil)).Elem()
|
||||
|
||||
// IsTruthfulValue returns whether the given value has a meaningful truth value.
|
||||
|
Reference in New Issue
Block a user