Created
January 7, 2015 21:28
-
-
Save davidrleonard/0fc96dacfda6b6ad5828 to your computer and use it in GitHub Desktop.
Jekyll/Liquid: Create fake-ish hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign test-topics = 'topic-one\Topic One|topic-two\Topic Two|topic-three\Topic Three' | split: '|' %} | |
{% for entries in test-topics %} | |
{% for topic in entries %} | |
<!-- topic = 'topic-one\Topic One' --> | |
<p>First: {{ topic | split: '\' | first }}</p><!-- First: topic-one --> | |
<p>Second: {{ topic | split: '\' | last }}</p><!-- Second: topic-two --> | |
{% endfor %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment