Data with JSON-LD


I have converted my RDF/XML resume in JSON-LD. And now i’m trying to using it in GoHugo has data for generate a curriculum vitae page.

In my layout if i add :

{{ range $ }}
{{ . }}
{{ end }}

I get the entire content of the JSON-LD. But if i want a particular value from a particular key, it doesn’t worked.

{{ range $ }}
{{ .foaf:name }}
{{ end }}

I’m suppose it’s because of the prefixed namespace before the key, but i haven’t find no clue about how i’m suppose to do that.

Thanks for the help.

{{ }}

Not working :

[hs0ucy@hs0ucy-x230 hscc]$ hugo server Started building site ERROR: 2016/06/27 11:28:36 general.go:222: Error while rendering page file/ template: cv/single.html:6:14: executing "cv/single.html" at <.foaf.based_near>: can't evaluate field based_near in type interface {} 0 of 1 draft rendered.

And here’s the json file :



{{ index . "foaf:name" }}