diff --git a/error-404.hbs b/error-404.hbs new file mode 100644 index 00000000..080bfe11 --- /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 00000000..843d3637 --- /dev/null +++ b/error.hbs @@ -0,0 +1,66 @@ +{{!-- + 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 0630061f..bbe95c3f 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 cf025445..14026b91 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 9c9370fb..fded86e0 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 7f4988ef..4e628098 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 eed05db6..aae346c7 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 ac3edaa3..550f0bfe 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 32d1a200..6c20bdbc 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 f30deca2..a7cfbba6 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 1a4c0e73..2c3884e6 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 69c63ba6..1e5797a5 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 cb2bc85b..6dc9f1fc 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 bd6af472..d223eefc 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 edf56df0..995ae711 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 7dc0e533..cfd0be6b 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": "",