Questions tagged [yaml-front-matter]
126 questions
1
vote
1 answer
Using Frontmatter with Dynamic Pages in Middleman 4
I have spent ample time researching this without finding a solution that worked. I would love it if someone could help me figure this out.
I’m trying to use Dynamic Pages in my setup, but need to include dynamic Frontmatter with this. But I can’t…

markwyner
- 21
- 2
1
vote
1 answer
Grouping categories in hexo
I would like to group categories in hexo. While the hexo <% list_categories %> helper lists all my categories alright, I would like to group nested categories right.
My question is on two levels, first, how do you represent the subcategories in the…

One
- 273
- 1
- 3
- 13
1
vote
1 answer
Jekyll for loop can't work as expected
I created a new page, there was a for loop to display the list of posts, but it can't work as expcted
and here is my code:
-
{% for post in site.posts %}
-
zeleven
- 436
- 1
- 6
- 21
1
vote
1 answer
How to add dynamic date to foundation 2 emails?
I am trying to add dynamic month and year to my foundation email template. I have tried adding the year in a test file - year.js in /src/helpers/ as shown here:
http://foundation.zurb.com/forum/posts/37160-insert-current-yeardate-in-html
but it…

byte me
- 71
- 8
1
vote
2 answers
Can you iterate a front matter collection variable in Jekyll?
I'm trying to see if it's possible to iterate a variable in Jekyll for a testimonial block I'm implementing for a Jekyll site. Basically, I'd like to have an icon be multiplied by the number dictated in my collection. Is this even possible with…

Sean Kelly
- 901
- 7
- 27
1
vote
0 answers
Jekyll: Get number of files in front matter specified sub-directories?
Imagine a directory specified in pages' front matter:
---
...
assets: "/assets/"
...
---
How can one determine the number of files in the assets' sub-directories? For example:
{% assign img_dir = page.assets | append: "img/" %}
{% if…

conner.xyz
- 6,273
- 8
- 39
- 65
1
vote
1 answer
Add an image to the front matter of a jekyll post
When using jekyll how do you add an image to the datatype of the front matter, so it shows up with the title and date within the blogpost list.

user6227558
- 21
- 1
- 2
1
vote
0 answers
Jekyll - including failing when using custom frontmatter variable
I have this little layout that just include (or better should include) the specific HTMl and parsing based on the language the post is focused.
{% if post.language == "en" %}
{{ post.language }}
{% include reviews.en.html %}
{% else if post.language…

HufflepuffBR
- 443
- 3
- 15
1
vote
1 answer
Rails not saving modified attributes
I am writing a markdown blog and I want to use front matter to define meta data such as post titles. This front matter is part of the markdown field and is parsed in the controller's create action.
The issue I am facing is that my controller refuses…

danielbker
- 392
- 1
- 3
- 21
1
vote
1 answer
Collection Permalinks using document Front Matter title
I have a bunch of documents in a collection that when developing, are more easily identified by their 'title code' which is why it would be best to use it as their filename (it helps keep a structure and order). Something like this:
_stories
…

RobertoCuba
- 881
- 9
- 25
1
vote
1 answer
How do I access the Data Object created by the gulp-gray-matter plugin (when compiling html files with nunjucks)
I am using nunjucks-render as a front-end JavaScript templating engine.
I would like to read frontal matter data out of certain .nunjuck files and then use that data whilst compiling my .nunjuck (template) files into .html files.
After a bit of…

Arman Nisch
- 1,132
- 11
- 11
1
vote
1 answer
Jekyll nested front matter not displaying in layout template for loop
I am trying to loop over a nested list in my posts font matter and display an associated image (using svg) for each nested item
post front matter:
---
layout: post
title: title of this post
spec:
- name: tee
- name: mobile
---
using a for loop…

savage0banana
- 21
- 2
1
vote
1 answer
How do I successfully integrate a Middleman frontmatter variable in a javascript snippet in the layout page written in haml?
Yesterday I decided to go in for Middleman and HAML and they are awesome!
Since I don't want to create multiple layouts for just a value, I tried to use a frontmatter variable to change a value in a javascript snippet at the bottom of the layout…

ctrlmaniac
- 404
- 4
- 13
- 28
1
vote
1 answer
Jekyll - YAML Front Matter Defaults not working
I have a multi-site Jekyll project with folders for each site, slc, and la.
However, my YAML Front Matter defaults are not working. None of the default values--including the layout, crucially--are being transmitted to my…

blisstdev
- 633
- 4
- 13
1
vote
1 answer
What is the default datatype of "Front Matter" for a Jekyll site?
I'm working on a Jekyll website. What is the default data type of variables in the Front Matter? Is it a string?
---
layout: post
title:
meta_keywords: key1, key2, key3
---
I'm trying to parse the keywords into an array and assign them to tags for…

Santos
- 17
- 2