Skip to content

Commit

Permalink
feat: add 404 error pages support
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Oct 23, 2023
1 parent d0ccf4c commit 6a98131
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion layouts/page.netlify_redirects.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@
{%- for language in site.languages|filter(l => l.code != site.language) ~%}
/ /{{ language.code }}/ 302! Language={{ language.code }}
{%- endfor -%}
{%- endif -%}
{%- 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 ~%}

0 comments on commit 6a98131

Please sign in to comment.