# Pass content from data file to front matter

**URL:** https://talk.jekyllrb.com/t/pass-content-from-data-file-to-front-matter/4220
**Category:** Help
**Created:** [April 13, 2020, 11:04am UTC](https://talk.jekyllrb.com/t/pass-content-from-data-file-to-front-matter/4220 "2020-04-13T11:04:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jonasjacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jonasjacek/32/2417_2.png) [@jonasjacek](https://talk.jekyllrb.com/u/jonasjacek)
#### Post date: [April 13, 2020, 11:04am UTC](https://talk.jekyllrb.com/t/pass-content-from-data-file-to-front-matter/4220/1 "2020-04-13T11:04:05Z")

</div>

Hi there,  
I am looking for a way to pass `title` and `meta-description` in my data file `products.csv` to front matter. I was looking around but couldn’t find a solution.

I am looking for something like this:

## products.csv

```auto
"name","title","meta-description"
"toaster","Great toaster","A long glorification of the toaster."

```

## Front matter

```auto
---
title: "{{ site.data.products.title where products.name == "toaster" }}"
description: "{{ site.data.products.meta-description where products.name == "toaster" }}"

```

Is something like this generally possible? If yes, how would I do it? Is such a case documented anywhere?

Thank you for your help!

---

<div class="post-metadata">

### Author: ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)
#### Post date: [April 13, 2020, 7:00pm UTC](https://talk.jekyllrb.com/t/pass-content-from-data-file-to-front-matter/4220/2 "2020-04-13T19:00:22Z")

</div>

this is not supported in Jekyll - there are other threads on here about being able to use liquid inside the front matter, I think one of those posts may have referenced a plugin to help do that? not sure. But your case of wanting to use a data file is one step beyond that.

Sounds like you want to make each line of the data file into a page? I wanted to do that too at one point. I think I may have seen a plugin for that too.

maybe there is another way to do what you want, can you describe your use case? for instance I think you could access those inside a layout - so no need to have the meta stuff in the front matter.

even if there was a plugin to do some of what you want, I would be wary of it.

---

<div class="post-metadata">

### Author: ![jonasjacek](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jonasjacek/32/2417_2.png) [@jonasjacek](https://talk.jekyllrb.com/u/jonasjacek)
#### Post date: [April 13, 2020, 7:38pm UTC](https://talk.jekyllrb.com/t/pass-content-from-data-file-to-front-matter/4220/3 "2020-04-13T19:38:52Z")

</div>

Thank you for your quick reply.  
There goes my hope that something like this is included. I generally try to stay away from plugins, so I will look around a bit more. Maybe there is a nice hack out there.

Thank you for your help!  
Jonas
