Since I was annoyed at not being able to use [jekyll-archives](https://github.com/jekyll/jekyll-archives) to create an archive for the books, I decided to implement myself the [jekyll-archives-v2](https://github.com/george-gca/jekyll-archives-v2) that doesn't have this limitation. Closes #923. --------- Signed-off-by: George Araújo <george.gcac@gmail.com>
39 lines
1.6 KiB
Plaintext
39 lines
1.6 KiB
Plaintext
---
|
|
layout: default
|
|
---
|
|
<div class="post">
|
|
<header class="post-header">
|
|
{% if page.type == 'categories' %}
|
|
<h1 class="post-title"><i class="fa-solid fa-tag fa-sm"></i> {{ page.title }}</h1>
|
|
<p class="post-description">an archive of {{ page.collection_name }} in this category</p>
|
|
{% elsif page.type == 'year' %}
|
|
<h1 class="post-title"><i class="fa-solid fa-calendar fa-sm"></i> {{ page.date | date: '%Y' }}</h1>
|
|
<p class="post-description">an archive of {{ page.collection_name }} from this year</p>
|
|
{% elsif page.type == 'tags' %}
|
|
<h1 class="post-title"><i class="fa-solid fa-hashtag fa-sm"></i> {{ page.title }}</h1>
|
|
<p class="post-description">an archive of {{ page.collection_name }} with this tag</p>
|
|
{% endif %}
|
|
</header>
|
|
|
|
<article class="archive">
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-borderless">
|
|
{% for document in page.documents %}
|
|
<tr>
|
|
<th scope="row">{{ document.date | date: '%b %d, %Y' }}</th>
|
|
<td>
|
|
{% if document.redirect == blank %}
|
|
<a class="post-link" href="{{ document.url | relative_url }}">{{ document.title }}</a>
|
|
{% elsif document.redirect contains '://' %}
|
|
<a class="post-link" href="{{ document.redirect }}" target="_blank">{{ document.title }}</a>
|
|
{% else %}
|
|
<a class="post-link" href="{{ document.redirect | relative_url }}">{{ document.title }}</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</article>
|
|
</div>
|