Closed julienma closed 5 years ago
So, just to clarify, you are wanting it to be like this:
images:
- /img/1.jpg
- /img/2.jpg
Yes :)
Sorry, I missed that above. I almost wonder if this would be better as a separate Widget type completely. But right now we are setting the name to null
or undefined
anyway, so maybe it could just be a setting. We would also have to ensure that the list items only had one field if we had it set to an array.
@Benaiah Will #468 work for this as well?
@tech4him1 yeah, that will solve this exact usecase and close this issue.
Any updates on this matter? Unfortunately, this is the way Hugo sets Open Graph pictures. I tried taking a look at it but couldn't find a starting point.
Totally forgot about this - it was never a real issue to begin with, just use field
instead of fields
to define the image field in your list. It will output a simple list of values rather than objects.
# config
fields:
- name: images
widget: list
field: { name: image, widget: image }
# output
images:
- /img/1.jpg
- /img/2.jpg
Sent with GitHawk
- Do you want to request a feature or report a bug? Question, maybe feature.
- What is the current behavior?
The way I define opengraph pictures on my site (using hugo) is to have an
images
array with values being path to pictures as string, not as an object.It should be output as this in the front matter:
So I set up these CMS fields:
However it seems
name
is always output, no matter what I tried:and so this is the current output:
- Question:
Is there any way currently to have multiple list items without any
name
?