First commit of i18n base blog using Eleventy v2. This uses English-implied URLs.
This commit is contained in:
21
en/index.njk
Normal file
21
en/index.njk
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
layout: layouts/home.njk
|
||||
eleventyNavigation:
|
||||
key: Home
|
||||
order: 1
|
||||
---
|
||||
{% set maxPosts = collections.posts.length | min(3) %}
|
||||
<h1>Latest {% if maxPosts == 1 %}Post{% else %}{{ maxPosts }} Posts{% endif %}</h1>
|
||||
|
||||
{% 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>
|
||||
|
||||
|
||||
<ul>
|
||||
{%- for entry in collections.all %}
|
||||
<li><a href="{{ entry.url }}"><code>{{ entry.url }}</code></a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user