Add post list, 404
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
11
layouts/partials/posts/item.html
Normal file
11
layouts/partials/posts/item.html
Normal 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>
|
||||
·
|
||||
<span class="duration">{{ printf "%d MIN READ" .ReadingTime }}</span>
|
||||
</div>
|
||||
</a>
|
||||
{{ end }}
|
7
layouts/partials/posts/list.html
Normal file
7
layouts/partials/posts/list.html
Normal 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>
|
Reference in New Issue
Block a user