generated from 11ty/eleventy-base-blog
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.njk
28 lines (24 loc) · 1.13 KB
/
index.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
eleventyComputed: metadata.title
layout: layouts/home.njk
eleventyNavigation:
key: Home
order: 1
---
<!-- Delete this message -->
<div class="notice">
Welcome to your new blog! Some tips to get started:
<ol>
<li>Edit the <code>_data/metadata.json</code> with your blog’s information.</li>
<li>Delete this message from <code>index.njk</code>.</li>
<li>Edit the footer in <code>_includes/layouts/base.njk</code></li>
</ol>
<p><code><a href="https://github.com/lkhrs/eleventy-simple">eleventy-simple</a></code> is a blog starter template created with <a href="https://www.11ty.dev">Eleventy</a> and <a href="https://simplecss.org">Simple.css</a>. Based on <code><a href="https://github.com/11ty/eleventy-base-blog">eleventy-base-blog</a></code>.</p>
</div>
<!-- Stop deleting -->
{% set maxPosts = collections.posts.length | min(3) %}
<h2>Latest {% if maxPosts == 1 %}Post{% else %}{{ maxPosts }} Posts{% endif %}</h2>
{% set postslist = collections.posts | head(-3) %}
{% set postslistCounter = collections.posts | length %}
{% include "postslist.njk" %}
<p>More posts can be found in <a href="{{ '/posts/' | url }}">the archive</a>.</p>