Questions tagged [yaml-front-matter]
126 questions
1
vote
1 answer
Eleventy, frontmatter data not being evaluated
I have a template that looks like this:
---
date: "2016-01-01T06:00-06:00"
value: "/{{ page.date | date: '%Y/%m/%d' }}/index.html"
---
Value prints: {{ value }}
But we expect: {{ page.date | date: '%Y/%m/%d' }}/index.html
When I render…
But we expect: {{ page.date | date: '%Y/%m/%d' }}/index.html
When I render…

Sheena
- 15,590
- 14
- 75
- 113
1
vote
1 answer
responsive image on top of post using jekyll
I recently started learning jekyll, and generating pages on localhost (win 7), I have installed a plugin that generates responsive images and HTML tags where the liquid tags are placed in pages or posts.
here is the link to the plugin:…

Dave99
- 95
- 8
1
vote
2 answers
Grav markup how to embed youtube video in frontmatter?
I was planning to do something like the following to embed a youtube video into a grav website using frontmatter (the page is currently using only only frontmatter with no entries in the markup file):
rows:
-
title: XYZ
…

The amateur programmer
- 1,238
- 3
- 18
- 38
1
vote
1 answer
Jekyll change element based on how you got to post (click order)
Right now I have a Jekyll site theme that allows users to filter posts by selecting tags.
If they are on the home page, it shows all posts and if they have a tag selected it shows only the posts with that tag.
When selecting a post, a new view…

Wimateeka
- 2,474
- 2
- 16
- 32
1
vote
0 answers
I cannot read frontmatter field in my setup
I have a gatsby setup project and am trying to write custom redirects.
I've managed to get it all to work, by creating createRedirect({from "...", to: "..."}) on my pages, and using the meta as suggested.
My .md file's frontmatter looks like this…

Dellirium
- 1,362
- 16
- 30
1
vote
1 answer
I am unable to set default front matter for drafts or posts when using Jekyll-compose
I have installed the jekyll-compose gem to streamline creating pages, posts etc. In the documentation. I have it working (i.e using the CLI commands I am able to generate, drafts, posts and pages).
However when I generate a post for example, I want…

Olly Middleton
- 37
- 7
1
vote
1 answer
Splitting out front matter from a Twig template with PCRE
Let's say I want to split the metadata from the Twig template
---
some metadata
multiple lines
---
Twig template
More data
I came up with /\A---\R(.+?\R)?---\R(.*)\Z/s which does it more or less but I am wondering whether it can become pathological…

chx
- 11,270
- 7
- 55
- 129
1
vote
1 answer
Front-matter defaults in VuePress config
I'm trying to switch my documentation site from GitBook to Vuepress and got stuck with front-matter variables. In GitBook, you just add variables in the config and then use them anywhere on the page as {{ book.variable_name }}. In Vuepress, at…

Bandantonio
- 816
- 1
- 7
- 19
1
vote
1 answer
Gatsby: set an image background through frontmatter, GraphQl and Styled-components
I know this problem sounds a bit complex but it's not.
I'll try my best to explain it in a simple way:
I'm making a list of blog posts for the homepage of my Gatsby website.
The list is made of "boxes", every box that links to a post has a…

Santiago
- 361
- 4
- 21
1
vote
2 answers
Using front matter title as for url permalink
How can I use my front matter for the url instead of the file name?
I have a collection set up in my _config.yml
collections:
news:
output: true
I want to be able to use the page.title as my url, below is my front matter
---
layout:…

mrpbennett
- 1,527
- 15
- 40
1
vote
2 answers
Allow html/markdown to footer in VuePress
I am trying to add html/markdown to the footer variable in VuePress default theme. I would like to add url in te footer that links to my website. However, I cannot find a way to add url to the footer. Can you please tell me how can i do that?
Here…

Badan
- 248
- 1
- 10
1
vote
0 answers
Parse YAML front matter with R
I want to use YAML for SAS program documentation in a manner similar to how R studio uses YAML. Can I put YAML at the top of my program, then read it into R as some object? The program file would just be a text file called program_1.sas. There…

Harlan Nelson
- 1,394
- 1
- 10
- 22
1
vote
1 answer
Use of liquid tags across different pages
Is there a way to summon the description of post B (which is stated in its front matter) in post A?
The liquid tag {{page.description}} summons only the description of post A. Is there a way to include an url or something, thus using liquid tags…

Starassault
- 67
- 5
1
vote
1 answer
Conditionally add data-attributes in Jekyll
My basic YAML Front Matter for blog posts looks as:
layout: post
title: 'Crepes'
permalink: /crepes/
src: '/assets/images/crepes.jpg'
date: 2018-05-24 21:41:00
origin: http//...
ingredients:
- ingredient1: amount
-…

IP_
- 676
- 5
- 18
1
vote
1 answer
Jekyll: Access attribute of collection?
I'm trying to create a second _posts that behaves similar (it can be linked to, it has it's own layout, it's stored within the _works folder, and each work is titled with some-name.md).
Everything works great, except I can't find how I access the…

Tallboy
- 12,847
- 13
- 82
- 173