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 685fe94..8c8716a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,7 @@ + {% block canonical %} {% set permalink = section.permalink | default(value=page.permalink | default(value="")) %} @@ -15,6 +16,7 @@ {% if permalink and permalink is not starting_with("/") %} {% endif %} + {% endblock %} {% set title = section.title | default(value=page.title @@ -59,6 +61,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..5635b88 --- /dev/null +++ b/templates/redirect.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block canonical %} + +{% endblock canonical %} + +{% block extra_head %} + + + +{% endblock extra_head %} + +{% block content %} +

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

+{% endblock content %}