New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOML array not parsed #2752

Closed
stp-ip opened this Issue Nov 30, 2016 · 9 comments

Comments

Projects
None yet
3 participants
@stp-ip

stp-ip commented Nov 30, 2016

Within my front-matter I have the following toml:

+++
title = "$title"
joined = "2011-01-01"
img = "3.jpg"
position = "$position"
social = [
  ["fa-twitter", "#"],
  ["fa-facebook", "#"],
  ["fa-linkedin", "#"]
]
+++

Rendering {{ .Params }} returns an empty social [ ].

I retried using yaml:

---
title: "$title"
joined: "2011-01-01"
img: "3.jpg"
position: "$position"
---
social:
  -
    - "fa-twitter"
    -  "#"
  -
    - "fa-facebook"
    -  "#"
  -
    - "fa-linkedin"
    -  "#"
---

Version used: Hugo master and Hugo 0.17 were tested. Both render an empty social [ ].

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Nov 30, 2016

Member

This was fixed like in the last week -- are you really sure you have tested this with the latest Hugo? And, make sure you build Hugo with make install to make sure you get the correct dependencies.

Member

bep commented Nov 30, 2016

This was fixed like in the last week -- are you really sure you have tested this with the latest Hugo? And, make sure you build Hugo with make install to make sure you get the correct dependencies.

@stp-ip

This comment has been minimized.

Show comment
Hide comment
@stp-ip

stp-ip Nov 30, 2016

Will definitely recheck, but I did use "go get -u + go build, which should have updated and rebuild".

stp-ip commented Nov 30, 2016

Will definitely recheck, but I did use "go get -u + go build, which should have updated and rebuild".

@stp-ip

This comment has been minimized.

Show comment
Hide comment
@stp-ip

stp-ip Nov 30, 2016

Hugo Static Site Generator v0.18-DEV BuildDate: 2016-11-30T08:57:46Z

stp-ip commented Nov 30, 2016

Hugo Static Site Generator v0.18-DEV BuildDate: 2016-11-30T08:57:46Z

@stp-ip

This comment has been minimized.

Show comment
Hide comment
@stp-ip

stp-ip Nov 30, 2016

git log for the golang source: "971d1ba commands: Add noChmod option to disable perm sync"

stp-ip commented Nov 30, 2016

git log for the golang source: "971d1ba commands: Add noChmod option to disable perm sync"

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Nov 30, 2016

Member

That is sadly not a proof since the fix was in the go-toml library. We use govendor to do vendoring, and I must admit that I'm no expert here ... But the makefile should help out.

Member

bep commented Nov 30, 2016

That is sadly not a proof since the fix was in the go-toml library. We use govendor to do vendoring, and I must admit that I'm no expert here ... But the makefile should help out.

@stp-ip

This comment has been minimized.

Show comment
Hide comment
@stp-ip

stp-ip Nov 30, 2016

Triple checked. Updated go vendor, updated deps, rebuild. Using make and without. Toml still comes up empty.

stp-ip commented Nov 30, 2016

Triple checked. Updated go vendor, updated deps, rebuild. Using make and without. Toml still comes up empty.

@stp-ip

This comment has been minimized.

Show comment
Hide comment
@stp-ip

stp-ip Nov 30, 2016

Might this be an issue with using arrays within arrays? It seems with the right syntax on both yaml and toml, both return an empty array.

stp-ip commented Nov 30, 2016

Might this be an issue with using arrays within arrays? It seems with the right syntax on both yaml and toml, both return an empty array.

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Nov 30, 2016

Member

You are right, Hugo does something weird in this case.

Member

bep commented Nov 30, 2016

You are right, Hugo does something weird in this case.

@bep bep added the Bug label Nov 30, 2016

@bep bep changed the title from Toml array not parsed to TOML array not parsed Dec 1, 2016

@moorereason moorereason added this to the v0.18.1 milestone Dec 28, 2016

@moorereason moorereason self-assigned this Dec 28, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Dec 28, 2016

Member

@moorereason I'm pretty sure this is not a 0.18 regression.

Member

bep commented Dec 28, 2016

@moorereason I'm pretty sure this is not a 0.18 regression.

@bep bep modified the milestones: v0.19, v0.18.1 Dec 28, 2016

moorereason added a commit to moorereason/hugo that referenced this issue Jan 6, 2017

@bep bep closed this in #2841 Jan 6, 2017

bep added a commit that referenced this issue Jan 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment