Create and access metadata hierarchy

title = "title"
description = ""

  date = "2019-04-30"
  type = "type"

Is possible to create and get (and how) access to this metadata on .md pages?

Yes. You can access it via etc. Also, if you remove the quotes around the date, it will turn into a proper date time object.

It does not work for me, with
{{ with }}<a>{{ . }}</a>{{ end }}
I got
executing "main" at <>: can't evaluate field date in type interface {}

If I do
{{ with .Params.Info }}<a>{{ . }}</a>{{ end }}
it builds with the output:
[map[date:2019-04-30 type:type]]
but I dont know how to access the individual items.

Iā€™m new to gohugo, is that a syntax from hugo or is it related to GO?

Maybe Params.Info is a list? Try replacing the double square brackets with single ones:


Both of us might need to brush up on TOML syntax :slight_smile:

You can access it like so:

{{ range .Params.Info }}{{ with .date }}<a>{{ . }}</a>{{ end }}{{ end }}

thanks! I will move on now!