From 65891f6c36b9cc04930f37b70e57535394e8598f Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 21 Jan 2026 18:30:58 -0500 Subject: [PATCH 1/4] feat: add html redirect --- templates/base.html | 2 ++ templates/redirect.html | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 templates/redirect.html diff --git a/templates/base.html b/templates/base.html index 685fe94..a5f0a0a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -59,6 +59,8 @@ document.getElementById("navbar").classList.toggle("open"); } + + {% block extra_head %}{% endblock %} diff --git a/templates/redirect.html b/templates/redirect.html new file mode 100644 index 0000000..b09770d --- /dev/null +++ b/templates/redirect.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block extra_head %} + + + + + +{% endblock %} + +{% block content %} +

If you are not redirected automatically, follow this link to be redirected

+{% endblock content %} From 5d95073d9e831d7f942651cba1faf61cf6bed2e6 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 21 Jan 2026 18:44:32 -0500 Subject: [PATCH 2/4] feat: add html redirect example --- content/redirects/.example.md | 11 +++++++++++ templates/base.html | 3 +++ templates/redirect.html | 6 ++++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 content/redirects/.example.md diff --git a/content/redirects/.example.md b/content/redirects/.example.md new file mode 100644 index 0000000..13eb964 --- /dev/null +++ b/content/redirects/.example.md @@ -0,0 +1,11 @@ ++++ +title = "Redirect example" +template = "redirect.html" + +# Other paths in the website to redirect. For example, the below causes +# berkeley.mt/redirect-example to also be a redirect +aliases = ["/redirect-example"] + +# The page to redirect to +extra.url = "https://sm.tream.ing" ++++ diff --git a/templates/base.html b/templates/base.html index a5f0a0a..abc8490 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,8 @@ + {% block canonical %} + {% set permalink = section.permalink | default(value=page.permalink | default(value="")) %} @@ -15,6 +17,7 @@ {% if permalink and permalink is not starting_with("/") %} {% endif %} + {% endblock %} {% set title = section.title | default(value=page.title diff --git a/templates/redirect.html b/templates/redirect.html index b09770d..fc80d12 100644 --- a/templates/redirect.html +++ b/templates/redirect.html @@ -1,8 +1,10 @@ {% extends "base.html" %} -{% block extra_head %} +{% block canonical %} +{% endblock canonical %} +{% block extra_head %} @@ -10,7 +12,7 @@ -{% endblock %} +{% endblock extra_head %} {% block content %}

If you are not redirected automatically, follow this link to be redirected

From 14b14e4df29b7d7987d27714a9c7cf0a7bd2be4f Mon Sep 17 00:00:00 2001 From: Andrew Liu <43867329+lethalNeutrino@users.noreply.github.com> Date: Mon, 26 Jan 2026 14:23:12 -0800 Subject: [PATCH 3/4] chore: remove empty line --- templates/base.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index abc8490..8c8716a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -9,7 +9,6 @@ {% block canonical %} - {% set permalink = section.permalink | default(value=page.permalink | default(value="")) %} From 88c75e43f774b2de1296a29348175eeeb20069d6 Mon Sep 17 00:00:00 2001 From: Andrew Liu <43867329+lethalNeutrino@users.noreply.github.com> Date: Mon, 26 Jan 2026 14:24:35 -0800 Subject: [PATCH 4/4] feat: remove extraneous fields in a tag --- templates/redirect.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/redirect.html b/templates/redirect.html index fc80d12..5635b88 100644 --- a/templates/redirect.html +++ b/templates/redirect.html @@ -15,5 +15,5 @@ {% endblock extra_head %} {% block content %} -

If you are not redirected automatically, follow this link to be redirected

+

If you are not redirected automatically, follow this link to be redirected.

{% endblock content %}