People,
I found a comment via Googling that this is possible but I am stuck - the suggestion was to put the new _posts under a new dir eg “articles”. I have:
- created the the new dirs
- put an item in “articles/_posts”
- copied blog.html to articles.html and edited it appropriately
but I am having problems with the iteration - this doesn’t work:
{% for post in site.articles.posts %}
<div class="post-area">
<a href="{{ post.url | prepend: site.baseurl }}" class="bold">{{ post.title }}</a>
<p class="post-date">{{ post.date | date_to_long_string }}</p>
<p>
{{ post.content | strip_html | truncatewords: 50 }}
</p>
</div>
{% endfor %}
I have tried variations of “{% for post in site.articles.posts %}” but can’t get it to work - I presume it is something simple?
Thanks,
Phil.