Skip to content

Instantly share code, notes, and snippets.

@luukee
Last active April 29, 2025 10:25
Show Gist options
  • Select an option

  • Save luukee/0d7729db11fa1e9d6c9d544dd6431b8d to your computer and use it in GitHub Desktop.

Select an option

Save luukee/0d7729db11fa1e9d6c9d544dd6431b8d to your computer and use it in GitHub Desktop.

Revisions

  1. luukee revised this gist Apr 29, 2025. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions dump.liquid
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    {% comment %}
    Description:
    Snippet to dump the content of an object in the console
    Usage:
    {% render 'dump' with [OBJECT] %}
    {% endcomment %}

    <script type="text/javascript">
    console.log({{ dump | json }});
    </script>
  2. luukee revised this gist Apr 29, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dump-metafields.liquid
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    {% comment %}
    Description:
    Snippet to dump the metafields of an object
    Snippet to dump the metafields of an objectt in the console
    Usage:
    {% render 'dump-metafields' with article.metafields.blog.sections %}
    or
  3. luukee revised this gist Apr 29, 2025. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions dump-metafields.liquid
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    {% comment %}
    Description:
    Snippet to dump the metafields of an object
    Usage:
    {% render 'dump-metafields' with article.metafields.blog.sections %}
    or
    {% render 'dump-metafields' with article.metafields.custom.sections %}
    Description:
    Snippet to dump the metafields of an object
    Usage:
    {% render 'dump-metafields' with article.metafields.blog.sections %}
    or
    {% render 'dump-metafields' with article.metafields.custom.sections %}
    {% endcomment %}

    <script type="text/javascript">
    console.log('Metafields Data:', {{ dump-metafields | map: "value" | json }});
    console.log('Metafields Data:', {{ dump-metafields | map: "value" | json }});
    </script>
  4. luukee created this gist Apr 29, 2025.
    12 changes: 12 additions & 0 deletions dump-metafields.liquid
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    {% comment %}
    Description:
    Snippet to dump the metafields of an object
    Usage:
    {% render 'dump-metafields' with article.metafields.blog.sections %}
    or
    {% render 'dump-metafields' with article.metafields.custom.sections %}
    {% endcomment %}

    <script type="text/javascript">
    console.log('Metafields Data:', {{ dump-metafields | map: "value" | json }});
    </script>