diff --git a/i18n/en.yaml b/i18n/en.yaml
index 44aa95be..366fdc12 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -127,3 +127,14 @@
- id: talks
translation: Talks
+
+- id: projects
+ translation: Projects
+
+# Error 404
+
+- id: page_not_found
+ translation: Page not found
+
+- id: 404_recommendations
+ translation: Perhaps you were looking for one of these?
diff --git a/layouts/404.html b/layouts/404.html
index 2779df79..889db3e9 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -2,22 +2,48 @@
{{ partial "navbar.html" . }}
-
Page not found
-
Maybe you were looking for one of these?
+
{{ i18n "page_not_found" }}
+
{{ i18n "404_recommendations" }}
-
Recent Posts
- {{ range last 20 (where .Data.Pages "Section" "=" "post") }}
+ {{ $posts_len := len (where .Site.RegularPages "Section" "post") }}
+ {{ if gt $posts_len 0 }}
+
{{ i18n "posts" }}
+ {{ range last 5 (where .Site.RegularPages "Section" "post") }}
{{ end }}
+ {{ end }}
-
Recent Publications
- {{ range last 20 (where .Data.Pages "Section" "=" "publication") }}
+ {{ $pubs_len := len (where .Site.RegularPages "Section" "publication") }}
+ {{ if gt $pubs_len 0 }}
+
{{ i18n "publications" }}
+ {{ range last 5 (where .Site.RegularPages "Section" "publication") }}
{{ end }}
+ {{ end }}
+
+ {{ $talks_len := len (where .Site.RegularPages "Section" "talk") }}
+ {{ if gt $talks_len 0 }}
+
{{ i18n "talks" }}
+ {{ range last 5 (where .Site.RegularPages "Section" "talk") }}
+
+ {{ end }}
+ {{ end }}
+
+ {{ $projects_len := len (where .Site.RegularPages "Section" "project") }}
+ {{ if gt $projects_len 0 }}
+
{{ i18n "projects" }}
+ {{ range last 5 (where .Site.RegularPages "Section" "project") }}
+
+ {{ end }}
+ {{ end }}
{{ partial "footer_container.html" . }}