Skip to content

Instantly share code, notes, and snippets.

@reggi
Last active December 7, 2023 01:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save reggi/7455604 to your computer and use it in GitHub Desktop.
Save reggi/7455604 to your computer and use it in GitHub Desktop.
How to do objects in liquid. Would love any feedback in comments
{% assign persons_delimiter = "!#$persons!#$" %}
{% assign person_delimiter = "!#$person!#$" %}
{% assign persons = "" %}
{% assign person = "" %}
{% assign person = person | append: "thomas" | append: person_delimiter %}
{% assign person = person | append: "This is for the fast talker. The message perfectly resonates with the go getter who puts their best foot forward, and is loving life. The colors are bright and aren’t dismal, which is a joy to look at. It’s aggressive and bold and really packs a punch." | append: person_delimiter %}
{% assign person = person | append: "Do No Harm Poster" | append: person_delimiter %}
{% assign persons = persons | append: person | append: persons_delimiter%}
{% assign person = "" %}
{% assign person = person | append: "andrew" | append: person_delimiter %}
{% assign person = person | append: "This is for explorers and pioneers. Why it’s a great gift: We all strive for self-improvement and the desire to be the best we can be. Even though you may not know which specific road to travel or where it is you’re going, what matters is that you’re going. It takes some getting lost to find what you’re looking for in life without ever knowing you were intentionally looking." | append: person_delimiter %}
{% assign person = person | append: "Getting Lost Cards" | append: person_delimiter %}
{% assign persons = persons | append: person | append: persons_delimiter%}
{% assign persons = persons | split: persons_delimiter %}
{% for _person in persons %}
{% assign person = _person | split: person_delimiter %}
{% assign name = person[0] %}
{% assign description = person[1] %}
{% assign product = person[2] %}
{{ name }} // thomas andrew
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment