Skip to content

Instantly share code, notes, and snippets.

View CharlesRyan's full-sized avatar

Charles Ryan CharlesRyan

View GitHub Profile
@CharlesRyan
CharlesRyan / logger.liquid
Last active June 6, 2019 20:17
A liquid snippet that logs the value of any liquid variable that gets passed to it. It also has the ability to output the name of the variable if needed. There's a couple usage examples at the top of the snippet
{% comment %}
data_type options are 'string', 'object', 'iterable strings', 'iterable objects', and null
for numbers and booleans, enter a data_type of 'string'
it allows for omitting data_type by just logging it as both a string and an object
the capture tags can also be omitted if the name of the variable isn't needed
{% endcomment %}
{% comment %}
Usage Examples:
{% endcomment %}