summaryrefslogtreecommitdiff
path: root/posts/history.njk
blob: c3cdc5084e0aa75b75b1d1a7cee3bd58f25dbaf1 (plain)
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
29
30
31
32
33
---js
{"layout": "page.njk",
"eleventyExcludeFromCollections": true,
"eleventyComputed": {
  "pageTitle": "{{ pagination.pageNumber + 1 }} – {{ metadata.title | safe }}" },
"permalink": "archive/{{ pagination.pageNumber + 1 }}/index.html",
"pagination": {
  "data": "collections.all",
  "before": data => data.slice(0,-1),
  "alias": "posts",
  "size": 5 }}
---
      <a id="up" title="Home" aria-label="Home" href="/"></a>
      <h1>{{ metadata.title }} &mdash; Page {{ pagination.pageNumber + 1 }}</h1>
{% for post in posts %}
      <hr>
      <section>
      <h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2>
      {%- set postDate = post.date.toISOString().slice(0,10) %}
      <p class="post-date"><time datetime="{{ postDate }}">{{ postDate }}</time></p>
      {{ post | excerpt | safe }}
      </section>
{% endfor %}
      <nav>
        <a id="next" rel="next" href="{% if pagination.href.next
          %}{{ pagination.href.next }}{% else %}/{% endif %}">Newer</a>
      {%- if pagination.href.previous %}
        <a id="prev" rel="prev" href="{{ pagination.href.previous }}">Older</a>
      {%- endif %}
        <a id="last" rel="last" href="/">Latest</a>
      {%- if pagination.pageNumber > 0 %}
        <a id="first" rel="first" href="/1/">First</a>{% endif %}
      </nav>