mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 01:12:53 +00:00
Implemented archive page
This commit is contained in:
+1
-4
@@ -6,13 +6,10 @@ genenerate_categories_pages = false
|
||||
generate_tags_pages = false
|
||||
generate_rss = true
|
||||
feed_filename = "rss.xml"
|
||||
minify_html = true
|
||||
minify_html = false
|
||||
taxonomies = [{ name = 'tags', feed = false }]
|
||||
compile_sass = true
|
||||
|
||||
# Whether to build a search index to be used later on by a JavaScript library
|
||||
build_search_index = true
|
||||
|
||||
[markdown]
|
||||
highlight_code = true
|
||||
highlight_theme = "gruvbox-dark"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
+++
|
||||
sort_by = "date"
|
||||
template= "archive.html"
|
||||
+++
|
||||
@@ -0,0 +1,26 @@
|
||||
{% extends "section.html" %}
|
||||
{% block content %}
|
||||
<main id="content">
|
||||
<header>
|
||||
<h1>Archive</h1>
|
||||
</header>
|
||||
{% set section = get_section(path="posts/_index.md") %}
|
||||
{% for year, posts in section.pages
|
||||
| sort(attribute="date")
|
||||
| reverse
|
||||
| group_by(attribute="year") %}
|
||||
<div class="archive">
|
||||
<h2>{{ year }}</h2>
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li>
|
||||
<time>{{ post.date | date(format="%d-%h") }}</time>
|
||||
<a href="{{ post.permalink }}">{{ post.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</main>
|
||||
{% include "footer.html" %}
|
||||
{% endblock content %}
|
||||
@@ -6,6 +6,8 @@
|
||||
⬡
|
||||
<a href="/tags">Tags</a>
|
||||
⬡
|
||||
<a href="/archive">Archive</a>
|
||||
⬡
|
||||
<a href="/contact">Contact</a>
|
||||
</nav>
|
||||
<p>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{% endblock meta %}
|
||||
<link rel="dns-prefetch" href="https://fonts.googleapis.com" />
|
||||
<link rel="stylesheet" href="/site.css" />
|
||||
<link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
{% block links %}
|
||||
<link rel="canonical" href="{{ section.permalink }}" />
|
||||
{% endblock links %}
|
||||
|
||||
Reference in New Issue
Block a user