diff options
author | Ryan Kilpadi <47367209+rkilpadi@users.noreply.github.com> | 2025-01-07 04:15:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-07 10:15:02 +0100 |
commit | 9f0de8199f83ae52b363bdf14400bff400c16adb (patch) | |
tree | 1ca8746641b54b016efa8025ba0317b99484b9fe | |
parent | 5f3cb583abb3f39e06d1b511c1b08635e6fa7bfd (diff) | |
download | htmx-9f0de8199f83ae52b363bdf14400bff400c16adb.tar.gz htmx-9f0de8199f83ae52b363bdf14400bff400c16adb.zip |
Add 404 page (#3105)
-rw-r--r-- | www/templates/404.html | 11 | ||||
-rw-r--r-- | www/themes/htmx-theme/templates/base.html | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/www/templates/404.html b/www/templates/404.html new file mode 100644 index 00000000..2753b2a1 --- /dev/null +++ b/www/templates/404.html @@ -0,0 +1,11 @@ +{% extends "htmx-theme/templates/base.html" %} + +{% block title %} + {% set html_title = "</> htmx ~ 404 Not found " %} +{% endblock title %} + +{% block content %} + <h1 style="margin-bottom: 500px;"> + 404 Not Found + </h1> +{% endblock content %} diff --git a/www/themes/htmx-theme/templates/base.html b/www/themes/htmx-theme/templates/base.html index 309b1d77..ea6b194d 100644 --- a/www/themes/htmx-theme/templates/base.html +++ b/www/themes/htmx-theme/templates/base.html @@ -9,7 +9,7 @@ {# This block should set html_title appropriately -#} {% block title %} {% endblock title -%} <title>{{ html_title | default(value=config.title) | safe }}</title> - <link rel="canonical" href="{{ current_url | safe }}"> + {% if current_url %} <link rel="canonical" href="{{ current_url | safe }}"> {% endif %} {#TODO: only generate this for the home page #} <link rel="alternate" type="application/atom+xml" title="Sitewide Atom feed" href="/atom.xml"> <link rel="stylesheet" href="/css/site.css"> |