Add post list, 404

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-06 23:05:36 +02:00
parent 19c5daa5c6
commit f5a737bf98
11 changed files with 115 additions and 13 deletions

11
layouts/404.html Normal file
View File

@@ -0,0 +1,11 @@
{{ define "main" }}
<main>
<div class="content">
<h1>404</h1>
<p>This is a dead link. Whatever was here, it&apos;s gone now.</p>
<p>
<a href="{{ .Site.BaseURL }}">Let&apos;s pretend this never happened</a>.
</p>
</div>
</main>
{{ end }}

View File

@@ -1,2 +1,7 @@
{{ define "main" }}
<main>
<div class="content">
{{ partial "posts/list.html" . }}
</div>
</main>
{{ end }}

View File

@@ -0,0 +1,11 @@
{{ if not .Params.private }}
<a href="{{ .Permalink }}" class="post">
<h1 class="title">{{ .Title }}</h1>
<div class="summary">{{ .Summary }}</div>
<div class="meta">
<span class="date">{{ .Date | time.Format ":date_medium" }}</span>
&middot;
<span class="duration">{{ printf "%d MIN READ" .ReadingTime }}</span>
</div>
</a>
{{ end }}

View File

@@ -0,0 +1,7 @@
<div class="posts-list">
{{ with .Site.GetPage "/posts" }}
{{ range sort .Pages "Date" "desc" }}
{{ partial "posts/item.html" . }}
{{ end }}
{{ end }}
</div>