diff --git a/error-404.hbs b/error-404.hbs new file mode 100644 index 000000000..5065c4c3e --- /dev/null +++ b/error-404.hbs @@ -0,0 +1,44 @@ +{{!< default}} + +{{!-- + 404 page. Inherits the default layout so visitors keep the theme's + navigation, footer, and overall look while they figure out where to go. +--}} + +
+ +
+ +
+

{{statusCode}}

+

{{t "Page not found"}}

+
+ +
+

+ {{t "Go to the front page →"}} +

+
+ +
+ +
+ +{{!-- Visitors landing here didn't find what they were looking for. + Suggest a few recent posts to help them re-engage. --}} +{{#get "posts" include="authors" limit="3" as |suggested|}} + {{#if suggested}} +
+
+

{{t "Recent posts"}}

+
+
+ {{#foreach suggested}} + {{> "post-card" lazyLoad=true}} + {{/foreach}} +
+
+
+
+ {{/if}} +{{/get}} diff --git a/error.hbs b/error.hbs new file mode 100644 index 000000000..d96fa6f30 --- /dev/null +++ b/error.hbs @@ -0,0 +1,86 @@ +{{!-- + Generic error template — handles all non-404 errors (500, etc.). + Standalone (doesn't extend default.hbs) and kept lightweight on + purpose: minimal dependencies, no partials, no API calls. + + The reasoning mirrors Casper's: 500 errors usually happen when + something on the server is struggling, so we don't want the error + page itself to compound the issue. Keep this template as + self-contained as possible. +--}} + + + + + {{meta_title}} + + + + + + + + {{ghost_head}} + + + +
+ +
+ +
+

{{statusCode}}

+

{{message}}

+
+ +
+

+ {{t "Go to the front page →"}} +

+
+ + {{#if errorDetails}} +
+

{{t "Theme errors"}}

+
    + {{#foreach errorDetails}} +
  • + {{rule}} + {{#foreach failures}} +

    {{ref}}: {{message}}

    + {{/foreach}} +
  • + {{/foreach}} +
+
+ {{/if}} + +
+ +
+ + {{ghost_foot}} + + + diff --git a/locales/context.json b/locales/context.json index 0630061f2..bbe95c3f7 100644 --- a/locales/context.json +++ b/locales/context.json @@ -58,6 +58,7 @@ "Next →": "solo/post.hbs", "Older Posts": "ghost-tpl/pagination.hbs", "Page {page} of {totalPages}": "alto/partials/pagination.hbs, ghost-tpl/pagination.hbs", + "Page not found": "Friendly message shown on 404 pages", "Paid": "solo/partials/loop.hbs", "Paid-members only": "casper/partials/post-card.hbs", "Please enter a valid email address": "ghost-private/private.hbs", diff --git a/locales/de-CH.json b/locales/de-CH.json index cf0254453..14026b916 100644 --- a/locales/de-CH.json +++ b/locales/de-CH.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/de.json b/locales/de.json index 9c9370fbc..fded86e05 100644 --- a/locales/de.json +++ b/locales/de.json @@ -58,6 +58,7 @@ "Next →": "Weiter →", "Older Posts": "Ältere Beiträge", "Page {page} of {totalPages}": "Seite {page} von {totalPages}", + "Page not found": "", "Paid": "Kostenpflichtig", "Paid-members only": "Nur für zahlende Mitglieder", "Please enter a valid email address": "", diff --git a/locales/en.json b/locales/en.json index 7f4988ef3..4e628098e 100644 --- a/locales/en.json +++ b/locales/en.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/fr.json b/locales/fr.json index eed05db67..aae346c7c 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -58,6 +58,7 @@ "Next →": "Suivant →", "Older Posts": "Publications plus anciennes", "Page {page} of {totalPages}": "Page {page} sur {totalPages}", + "Page not found": "Page introuvable", "Paid": "Payant", "Paid-members only": "Réservé aux abonnés payants", "Please enter a valid email address": "", diff --git a/locales/ga.json b/locales/ga.json index ac3edaa39..550f0bfec 100644 --- a/locales/ga.json +++ b/locales/ga.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/gd.json b/locales/gd.json index 32d1a200f..6c20bdbc4 100644 --- a/locales/gd.json +++ b/locales/gd.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/nl.json b/locales/nl.json index f30deca2b..a7cfbba68 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/pt-BR.json b/locales/pt-BR.json index 1a4c0e73e..2c3884e65 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/sv.json b/locales/sv.json index 69c63ba61..1e5797a5e 100644 --- a/locales/sv.json +++ b/locales/sv.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "", diff --git a/locales/tr.json b/locales/tr.json index cb2bc85b0..6dc9f1fc0 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -58,6 +58,7 @@ "Next →": "Sonraki →", "Older Posts": "Daha Eski Yazılar", "Page {page} of {totalPages}": "Sayfa {page} / {totalPages}", + "Page not found": "", "Paid": "Ücretli", "Paid-members only": "Ücretli üyelere özel", "Please enter a valid email address": "", diff --git a/locales/uk.json b/locales/uk.json index bd6af472c..d223eefcd 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -58,6 +58,7 @@ "Next →": "Далі →", "Older Posts": "Старіші дописи", "Page {page} of {totalPages}": "Сторінка {page} з {totalPages}", + "Page not found": "", "Paid": "Платний", "Paid-members only": "Тільки за платною підпискою", "Please enter a valid email address": "", diff --git a/locales/zh-Hant.json b/locales/zh-Hant.json index edf56df07..995ae7119 100644 --- a/locales/zh-Hant.json +++ b/locales/zh-Hant.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "付費會員限定", "Please enter a valid email address": "", diff --git a/locales/zh.json b/locales/zh.json index 7dc0e5339..cfd0be6b6 100644 --- a/locales/zh.json +++ b/locales/zh.json @@ -58,6 +58,7 @@ "Next →": "", "Older Posts": "", "Page {page} of {totalPages}": "", + "Page not found": "", "Paid": "", "Paid-members only": "", "Please enter a valid email address": "",