mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.24k stars 25.36k forks source link

Liquid Exception: stack level too deep in /_layouts/default.html #2399

Closed ekofi closed 4 years ago

ekofi commented 4 years ago

I am trying to add amp-jekyll plugin to my github website. I cloned my website to my computer, then I type bundle exec jekyll serve. It gives this output:

NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. I
t will be removed on or after 2019-12-01.
Gem::Specification#rubyforge_project= called from C:/Ruby25-x64/lib/ruby/gems/2.
5.0/specifications/em-websocket-0.5.1.gemspec:15.
Configuration file: C:/Users/tensor/Desktop/ekofimakale.github.io/_config.yml
            Source: C:/Users/tensor/Desktop/ekofimakale.github.io
       Destination: C:/Users/tensor/Desktop/ekofimakale.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
  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.
                    ------------------------------------------------
mmistakes commented 4 years ago

Don't think it's anything to do with the theme as you're not using the Ruby gem version and the errors are related to gem dependencies. This tells me it's likely an issue with one of the plugins you're using... amp-jekyll. I have no experience with that plugin. Are you sure it's been updated to work with Jekyll 4.0?

mmistakes commented 4 years ago

Also your Gemfile isn't correctly configured. You're missing all sorts of gems. You'll probably want it to look something like this

source "https://rubygems.org"

gem "minimal-mistakes-jekyll"
gem "amp-jekyll"
group :jekyll_plugins do
  gem "jekyll-paginate"
  gem "jekyll-sitemap"
  gem "jekyll-gist"
  gem "jekyll-feed"
  gem "jemoji"
end

gem "wdm", "~> 0.1.0" if Gem.win_platform?

Then run bundle update before bundle exec jekyll build

ekofi commented 4 years ago

Solved. Thanks. Issue was in amp-jekyll.