Rename the variable for #47

This commit is contained in:
Zach Leatherman 2020-01-02 21:51:24 -06:00
parent 38cfa275d2
commit 03bb550d46
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<ol reversed class="postlist" style="counter-reset: start-from {{ (counterOffset or postslist.length) + 1 }}"> <ol reversed class="postlist" style="counter-reset: start-from {{ (postslistCounter or postslist.length) + 1 }}">
{% for post in postslist | reverse %} {% for post in postslist | reverse %}
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}"> <li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a> <a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>

View File

@ -8,7 +8,7 @@ eleventyNavigation:
<h1>Latest 3 Posts</h1> <h1>Latest 3 Posts</h1>
{% set postslist = collections.posts | head(-3) %} {% set postslist = collections.posts | head(-3) %}
{% set counterOffset = collections.posts | length %} {% set postslistCounter = collections.posts | length %}
{% include "postslist.njk" %} {% include "postslist.njk" %}
<p>More posts can be found in <a href="{{ '/posts/' | url }}">the archive</a>.</p> <p>More posts can be found in <a href="{{ '/posts/' | url }}">the archive</a>.</p>