resources = append(resources, cast.ToStringMap(vvv))
}
case []map[string]interface{}:
- for _, vvv := range vv {
- resources = append(resources, vvv)
- }
+ resources = append(resources, vv...)
case []interface{}:
for _, vvv := range vv {
switch vvvv := vvv.(type) {
if cfg.IsSet("frontmatter") {
fm := cfg.GetStringMap("frontmatter")
- if fm != nil {
- for k, v := range fm {
- loki := strings.ToLower(k)
- switch loki {
- case fmDate:
- c.date = toLowerSlice(v)
- case fmPubDate:
- c.publishDate = toLowerSlice(v)
- case fmLastmod:
- c.lastmod = toLowerSlice(v)
- case fmExpiryDate:
- c.expiryDate = toLowerSlice(v)
- }
+ for k, v := range fm {
+ loki := strings.ToLower(k)
+ switch loki {
+ case fmDate:
+ c.date = toLowerSlice(v)
+ case fmPubDate:
+ c.publishDate = toLowerSlice(v)
+ case fmLastmod:
+ c.lastmod = toLowerSlice(v)
+ case fmExpiryDate:
+ c.expiryDate = toLowerSlice(v)
}
}
}