Reputation: 6024
I am aware you can add and use html page custom front matter fields using the {{ page.myField }} directive but this does not work for posts (i.e. when iterating site.posts in a for loop.
My problem, what I have done ...
I created a new post in _posts with a .md extension containing new custom front matter fields (it is published and refixed correctly with date) - Seems correct
I loop all the posts using {% for post in site.posts %} - This works
When I attempt to use these using a liquid tag {{ post.myNewField }} it is not available but does show in post.content as text not a useable field.
Surely this cannot be correct. I would assume anything in the markdown in the front matter section should be accessible, as it seems to say so in the Jekyll front matter instruction http://jekyllrb.com/docs/frontmatter/#custom-variables
Please help.
Upvotes: 0
Views: 548
Reputation: 6024
cause of my issue was UTF-8-DOM encoding when it should have just been UTF-8 encoding for .md files
Upvotes: 0