# Stack level too deep - amp-jekyll

**URL:** <https://talk.jekyllrb.com/t/stack-level-too-deep-amp-jekyll/3922>\
**Category:** Help\
**Created:** [February 13, 2020, 11:21am UTC](https://talk.jekyllrb.com/t/stack-level-too-deep-amp-jekyll/3922 "2020-02-13T11:21:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekofi](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/ekofi/32/4003_2.png) [@ekofi](https://talk.jekyllrb.com/u/ekofi)\
**Post date:** [February 13, 2020, 11:21am UTC](https://talk.jekyllrb.com/t/stack-level-too-deep-amp-jekyll/3922/1 "2020-02-13T11:21:38Z")

</div>

I am using minimal-mistakes theme. I am trying to install amp-jekyll plugin. When I try to `bundle exec jekyll serve`, it gives this error:

> Liquid Exception: stack level too deep in /\_layouts/default.html  
> ------------------------------------------------  
> Jekyll 4.0.0 Please append `--trace` to the `serve` command  
> for any additional information or backtrace.  
> ------------------------------------------------

/\_layouts/default.html

```
<html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js">
  <head>
    {% include head.html %}
    {% include head/custom.html %}
  </head>

  <body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">

    {% include browser-upgrade.html %}
    {% include masthead.html %}

    <div class="initial-content">
      {{ content }}
    </div>

    {% if site.search == true %}
      <div class="search-content">
        {% include search_form.html %}
      </div>
    {% endif %}

    <div class="page__footer">
      <footer>
        {% include footer/custom.html %}
        {% include footer.html %}
      </footer>
    </div>

    {% include scripts.html %}

  </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![michaelbach](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelbach/32/2151_2.png) [@michaelbach](https://talk.jekyllrb.com/u/michaelbach)\
**Post date:** [February 14, 2020, 7:25am UTC](https://talk.jekyllrb.com/t/stack-level-too-deep-amp-jekyll/3922/2 "2020-02-14T07:25:38Z")

</div>

I also had the “stack level too deep” error a while ago. Unfortunately I can’t remember the details; I loosely recall it was a structural error, certainly on _my_ side.

Here, if you have not tested that already, is it possible that you have a circular include somewhere? Removing most of your lines and then slowly adding back might isolate the problem to one of the xx.html includes. Good luck!

---

<div class="post-metadata">

**Author:** ![ekofi](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/ekofi/32/4003_2.png) [@ekofi](https://talk.jekyllrb.com/u/ekofi)\
**Post date:** [February 14, 2020, 7:49pm UTC](https://talk.jekyllrb.com/t/stack-level-too-deep-amp-jekyll/3922/3 "2020-02-14T19:49:04Z")

</div>

Hi, thanks for the answer. I found the problem and solved it. But one more thing, it cannot render markdown. Thanks again.
