website

Personal website
git clone https://github.com/michaelneuper/website.git
README | Files | Log | Refs

commit f0b9fbaa9b2154fb8cce10203471acd2d065b31d
parent 8d458c7100767ae01e06e15d77dc432a2d39fdbd
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date:   Sun, 11 Dec 2022 20:54:00 +0200

Show only the latest 10 posts

Diffstat:
Mlayouts/_default/list.html | 7+++++--
Mlayouts/partials/head_custom.html | 2+-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -9,13 +9,16 @@ <ul> {{ $pages := .Pages }} - {{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }} + {{ if .IsHome }}{{ $pages = first 10 .Site.RegularPages }}{{ end }} {{ range (where $pages "Section" "!=" "") }} <li> <span class="date">{{ .Date.Format "2006 Jan 2" }}</span> <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> </li> {{ end }} - </ul> + {{ if .IsHome }} + <a href="/posts/">See All<a> + {{ end }} + </ul> </div> {{ partial "footer.html" . }} diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html @@ -17,7 +17,7 @@ {{ range .Site.Menus.feed }} {{ $name := lower .Name}} <li class="pull-right"> - <a href="{{ .URL }}">{{ lower .Name}}</a> + <a href="{{ .URL }}">{{ lower .Name }}</a> </li> {{end}}