Data with JSON-LD

Hi,

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 $.Site.Data.documents.cv }}
{{ . }}
{{ 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 $.Site.Data.documents.cv }}
{{ .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.

{{ .foaf.name }}

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/curriculum-vitae.md: 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 : https://gist.github.com/hs0ucy/51db292266b4f7120460eba4a2a808db.

Thanks!

Try

{{ index . "foaf:name" }}