How can I make pairs of information in the front matter?

I had a look at the TOML spec. Dictionaries and hash-tables are here called tables. [[mirrors]] denotes that this in an array of tables.

First, we tried to use multi-dimensional arrays. According to the spec they are fine since we don’t mix different types.

Hugo uses go-toml for parsing. The project’s README states: This library supports TOML version v0.4.0. Looking in the toml spec v0.4.0 we can see that

mirrors = [["dl.site1.com/exe", "Site One"], ["dl.site2.org/exe", "Site2"]]

should work as expected.

Maybe I missed something in between. Nonetheless, the current version is in my eyes more descriptive.

1 Like