# Variable in front matter

**URL:** <https://talk.jekyllrb.com/t/variable-in-front-matter/1576>\
**Category:** Uncategorized\
**Created:** [March 12, 2018, 9:48pm UTC](https://talk.jekyllrb.com/t/variable-in-front-matter/1576 "2018-03-12T21:48:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonardo\_furtado](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/leonardo_furtado/32/859_2.png) [@Leonardo\_furtado](https://talk.jekyllrb.com/u/Leonardo_furtado)\
**Post date:** [March 12, 2018, 9:48pm UTC](https://talk.jekyllrb.com/t/variable-in-front-matter/1576/1 "2018-03-12T21:48:32Z")

</div>

Hello, today I started my journey to learn jekyll, unfortunately I already found a difficulty that I could not overcome.  
I created a new project and copied the files and folders from Minima to the main project folder. I was adding a variable in home.html like so:  
—  
layout: default  
title: My Title  
—  
I tried to use it in the Home file (Not yet changed by me) like this:  
`<h1> {{page.title}} </ h1>`

But he did not appear. What am I doing wrong?

Then I called:  
`<h1> {{page.layout}} </ h1>`  
to my surprise it worked, and wrote Home, I saw that it picked up from the Index.md file. But this file says I should not edit it.

---

<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:** [March 12, 2018, 11:57pm UTC](https://talk.jekyllrb.com/t/variable-in-front-matter/1576/2 "2018-03-12T23:57:58Z")

</div>

The `home` file looks like a layout file used on the home page (I don’t use minima). If you look at the index.md file there is no title - that is probably why it didn’t show up.

If you want to make sure, go to the index.md file and add `title: my title` to the front matter just to see if it works.

I’m guessing the theme is using something from the config file to do the title.
