Playing around with Jekyll
Jekyll uses a templating language called liquid, take a look at this crash course
This code should generate a list of posts. You can also see the code for this post here
{% raw %}
<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a><BR>
post.excerpt: {{ post.excerpt }}<br>
post.tags: {{ post.tags }}<br>
post.author: {{ post.author }}<br>
</li>
{% endfor %}
</ul>
{% endraw %}
And this is the list that was generated:
-
{% for post in site.posts %}
-
{{ post.title }}
post.excerpt: {{ post.excerpt }}
post.tags: {{ post.tags }}
post.author: {{ post.author }}
{% endfor %}
Print list of tags:
{% raw %}
<ul>
{% for post in site.posts %}
<li>
title: {{ post.title }}<br>tags:
{% for tag in post.tags %}
{{ tag }},
{% endfor %}
</li>
{% endfor %}
</ul>
</ul>
{% endraw %}
-
{% for post in site.posts %}
-
title: {{ post.title }}
tags: {% for tag in post.tags %} {{ tag }}, {% endfor %}
{% endfor %}