Liquid Cheat - ku-fpg/blackboard GitHub Wiki
Hacking Liquid
{% capture sidebar %}{% include "sidebar.md" %}{% endcapture %}
{{ sidebar | markdownify }}
(Yes, really!)
Number to String
{% capture year %}{{ item.year }}{% endcapture %}
Detecting Type
| Term | size | append | plus |
|---|---|---|---|
| "" | 0 | TRUE | FALSE |
| "Foo" | 3 | TRUE | FALSE |
| [] | 0 | FALSE | FALSE |
| [1,2,3] | 3 | FALSE | FALSE |
| 0 | 8 | FALSE | TRUE |
| 123 | 8 | FALSE | TRUE |
| {} | 0 | FALSE | FALSE |
| Chair: X | 1 | FALSE | FALSE |
{% include typecase.liquid value=... %}
Returns: number, list, object, string