aboutsummaryrefslogtreecommitdiff
path: root/templates/404.html
blob: 8c578302214d1f9cb12dfb65e75940caeac0ff7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends "base.html" %}

{%- block seo %}
  {{ super() }}
  {%- set title = "404 Page not found" %}

  {%- if config.title %}
    {%- set title_addition = title_separator ~ config.title %}
  {%- else %}
    {%- set title_addition = "" %}
  {%- endif %}

  {%- set description = config.description %}

  {{- macros_head::seo(config=config, title=title, title_addition=title_addition, description=description, is_404=true) }}
{%- endblock seo %}

{%- block content %}
    <div>
      <h1>404 :(</h1>
      {#- Default English message #}
      <p>Page not found, maybe moved{% if config.languages | length > 0 %} or not in this language{% endif %}. {% if config.build_search_index %}Try searching or{% endif %} <a href="{{ config.base_url | safe }}/{%- if config.extra.uglyurls %}index.html{%- endif %}">go to homepage</a>.</p>

      {# Iterate through each language and display the localised 404 message #}
      {%- for language_name, language in config.languages -%}
        {%- if language_name != config.default_language -%}
          <p>{{ trans(key="404_not_found", lang=language_name) }}. {% if config.build_search_index %}{{ trans(key="404_try_search", lang=language_name) }}{% endif %} <a href="{{ config.base_url }}/{{ language_name }}/{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ trans(key="404_go_home", lang=language_name) }}</a>.</p>
        {%- endif -%}
      {%- endfor -%}
    </div>
{%- endblock content %}