Layout not displayed with {{post.content}} in Jekyll

535 views Asked by At

When I build, Jekyll only display the post content without the layout. That is, it only inject the raw md/html post content and disregard completely the layout I attached to the article

here is my index.html (all of it)

    ---
    layout: default
    ---

    {% for post in site.posts reversed %}
        {{ post.content }}
    {% endfor %}

my default layout

<!DOCTYPE html>
<html>

  {% include head.html %}

  <body data-spy="scroll" data-target="#spynav">

    {% include header.html %}

    {{ content }}

    {% include footer.html %}

    <script src="js/vendor.js"></script>
    <script src="js/main.js"></script>
  </body>

</html>

my post layout

---
layout: none
---

    <div class="container">
        <div class="row first-row">
            <div class="col-sm-12">
                <div class="title-area">
                    <h2>{{ page.title }}</h2>
                    <p>{{ page.subtitle }}</p>
                </div>
                <div class="text-area">
                    {{ content }}
                </div>
            </div>
        </div>
    </div>

my post

---
layout: post
title: "test"
subtitle: "subtitle test"
---

Lorem ipsum
0

There are 0 answers