Browse Source

Rename the variable for #47

upstream
Zach Leatherman 3 years ago
parent
commit
03bb550d46
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      _includes/postslist.njk
  2. +1
    -1
      index.njk

+ 1
- 1
_includes/postslist.njk 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 %}
<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>


+ 1
- 1
index.njk View File

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

Loading…
Cancel
Save