diff --git a/layouts/page.netlify_redirects.twig b/layouts/page.netlify_redirects.twig index 25aecc6..137a4c3 100644 --- a/layouts/page.netlify_redirects.twig +++ b/layouts/page.netlify_redirects.twig @@ -13,4 +13,11 @@ {%- for language in site.languages|filter(l => l.code != site.language) ~%} / /{{ language.code }}/ 302! Language={{ language.code }} {%- endfor -%} -{%- endif -%} \ No newline at end of file +{%- endif ~%} +# Custom 404 error pages +{{ url(site.home, {'canonical': false}) }}* {{ url(site.page('404'), {'language': site.language, 'canonical': false}) }} 404 +{%- if site.languages > 1 -%} + {%- for language in site.languages|filter(l => l.code != site.language) ~%} +/{{ language.code }}/* {{ url(site.page('404', language.code), {'canonical': false}) }} 404 + {%- endfor -%} +{%- endif ~%} \ No newline at end of file