From 5d1bf2955b2fec10fddc3e7f4515a9f9d88b4717 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Sat, 28 Dec 2024 07:07:11 +0100 Subject: 404 content suggestions --- i18n/en.yml | 2 ++ layouts/404.html | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/i18n/en.yml b/i18n/en.yml index b2ead12..6a128ac 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -22,6 +22,7 @@ match_found: _blank: " " about: about author_by: By +maybe_look: Perhaps you were looking for one of these? minute_read: "min read" next: next no_match_found: "no match found" @@ -33,3 +34,4 @@ search_placeholder: "write your search terms" search_request: "Please enter a word or phrase above" see_all: "see all" translations: translations +try_search: Not there? Try using the search page. diff --git a/layouts/404.html b/layouts/404.html index 50cf5a3..1b3bacc 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -5,16 +5,16 @@

{{ .Title }}

-

Perhaps you were looking for one of these?

+

{{ T "maybe_look" }}

{{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} {{ $count := len $query }} {{ if gt $count 0 }}

{{ T "recent_pages" }}

-
-- cgit v1.2.3