Rename the variable for #47
This commit is contained in:
parent
38cfa275d2
commit
03bb550d46
@ -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>
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user