Bridgetown "could not be built" Liquid error in CI
Bridgetown renders content with Liquid (and Ruby components). A Liquid syntax error, an undefined variable, or a failing component makes a page fail to build, and bridgetown deploy exits non-zero.
What this error means
bridgetown deploy reports "Liquid error" or that a page "could not be built", naming the template and the underlying Liquid or Ruby message.
Liquid Exception: Liquid syntax error (line 10): Unknown tag 'endif' in /src/_layouts/post.liquid
Page "posts/hello.md" could not be built.Common causes
A Liquid syntax error in a layout
A mismatched tag (using endif for an unless, or an unclosed block) makes Liquid fail to parse the template.
An undefined variable or failing component
A template references data missing for some pages, or a Ruby component raises during render.
How to fix it
Fix the Liquid tag the error names
- Open the layout at the reported line.
- Close blocks with the matching end tag (endif/endunless/endfor).
- Re-run the build to confirm the page renders.
bin/bridgetown deployDefault missing template data
Guard optional fields so a missing value does not break the render.
{{ page.author | default: site.metadata.author }}How to prevent it
- Match every Liquid block to its correct end tag.
- Default optional front matter in layouts.
- Build locally before deploying in CI.