From a552c1e298b5c949fdbb6b763628a93ac6f518d4 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 16 Apr 2018 00:47:26 +0100 Subject: [PATCH] List most recent content on 404 error page Fix #492 --- layouts/404.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index 889db3e9..7672b5ce 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -8,7 +8,7 @@ {{ $posts_len := len (where .Site.RegularPages "Section" "post") }} {{ if gt $posts_len 0 }}

{{ i18n "posts" }}

- {{ range last 5 (where .Site.RegularPages "Section" "post") }} + {{ range first 5 (where .Site.RegularPages "Section" "post") }} @@ -18,7 +18,7 @@ {{ $pubs_len := len (where .Site.RegularPages "Section" "publication") }} {{ if gt $pubs_len 0 }}

{{ i18n "publications" }}

- {{ range last 5 (where .Site.RegularPages "Section" "publication") }} + {{ range first 5 (where .Site.RegularPages "Section" "publication") }} @@ -28,7 +28,7 @@ {{ $talks_len := len (where .Site.RegularPages "Section" "talk") }} {{ if gt $talks_len 0 }}

{{ i18n "talks" }}

- {{ range last 5 (where .Site.RegularPages "Section" "talk") }} + {{ range first 5 (sort (where .Site.RegularPages "Type" "talk") ".Params.time_start" "desc") }} @@ -38,7 +38,7 @@ {{ $projects_len := len (where .Site.RegularPages "Section" "project") }} {{ if gt $projects_len 0 }}

{{ i18n "projects" }}

- {{ range last 5 (where .Site.RegularPages "Section" "project") }} + {{ range first 5 (where .Site.RegularPages "Section" "project") }}