Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Better reporting of Liquid errors #624
The current issue is if you have a malformed Liquid call, Jekyll builds the site just fine but includes the Liquid exception as text on your page. You would have to stumble upon a page with an error on it to realize your code is wrong. If Liquid parsing/rendering fails, Jekyll should fail building as well (and alert you to what happened).
The solution is to call .render! rather than simply .render on Liquid templates. I do that here in the do_layout method of Convertible. I also add a stack trace dump and abort building Jekyll.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Please merge this in. I am using Jekyll for a project now and I want to have a pre-receive hook on my deploy git remote that runs jekyll and aborts the receive if there are any errors. Having raw liquid spewing out into the pages when it's entirely preventable is definitely not desirable.