Open stebrech opened 1 year ago
With the structure field type it can be configured in Kirby, but still the issue with camelcase and the pipe. Additionally it adds a hyphen:
fields:
eleventyNavigation:
label: Link in Hauptmenü
type: structure
fields:
key:
label: Linktext
type: text
order:
label: Nr. Reihenfolge
type: number
Result:
eleventynavigation: |
-
key: some key
order: 9
The frontmatter fields are mapped to Kirby fields internally. Kirby treats field names as case-insensitive, which is why the name gets changed to lowercase. Kirby fields are also always strings, so the nested YAML structure gets parsed as a string and converted back to an indented YAML string instead of the actual dictionary structure that was there before.
I use eleventyNavigation on some pages which has indented key and order. Kirby overwrites the camelcase written eleventyNavigation and adds a pipe.
Before saving:
After saving the page in Kirby:
Although I currently have this added manually to the markdown files and not integrated into the Kirby Config, CamelCase written objects do not seem to be accepted. I wouldn't know how to manage this indentation either.