moshen / jekyll-asset_bundler

A small plugin for Jekyll to easily bundle and compress site assets
MIT License
101 stars 21 forks source link

"Stack level too deep" when local relative file paths are in a bundle #26

Open graemeduckett opened 9 years ago

graemeduckett commented 9 years ago

I've just setup the bundler plugin and added three script files to a single bundle on my site. When building the site now I get an error (the liquid exception appears to repeat in the stack trace about as many times as there are pages on the site):

Liquid Exception: stack level too deep in _layouts/default.html
..ruby/gems/2.1.0/gems/jekyll-2.5.3/lib/jekyll/renderer.rb:98: stack level too deep (SystemStackError)

My bundle, at the bottom of my page, is pretty simple:

{% bundle %}
- //code.jquery.com/jquery-1.11.0.min.js
- /scripts/main.js
- /scripts/vendor/fitvid.js
{% endbundle %}

I'm using the default config.

One observation i've had is that it works fine when only the jQuery path is in the bundle. Introducing the local files returns the error again. Including two copies of the external jQuery path also works.

Any help is appreciated.

graemeduckett commented 9 years ago

As an update, I made remote versions of both of the internal script files and linked to them instead, which worked without errors.

Also, even the local linked files with nothing in them will cause errors.

moshen commented 9 years ago

If you could drop an example Jekyll site somewhere (gist, etc) and link it here I would appreciate it.

Thanks for the heads up.