From the docs:
In addition to using a single site config file, one can use the
configDir
directory (default toconfig/
) to maintain easier organization and environment specific settings.
- Each file represents a configuration root object, such as
Params
,Menus
,Languages
etc…
I have some troubles finding the right interpretation for “represents”.
Starting with a functional config config.toml
that has (a.o.)
languageCode = ...
baseURL = ...
[params]
...
[menu]
[[menu.main]]
identifier = "home"
post = "left"
name = "Over ons"
title = "Over ons"
url = "home/index.html"
weight = 1
...
Now I’ve put the complete [menu]
section into a separate file config/_default/menu.toml
. I get a very interesting (and not quite helpful) error message:
unable to cast map[string]interface {}{"main":[]map[string]interface {}{map[string]interface {}{"identifier":"home", "name":"Over ons", "post":"left", "title":"Over ons", "url":"home/index.html", "weight":1}....