summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-07-06 20:31:08 +0200
committerAlan Pearce2023-07-06 20:31:08 +0200
commit8ab05aa7c96bfb59ea6e50e0dfc6848a37e47447 (patch)
tree85ff9d3644cbe9e38c745ca5d22180aa94d39827
parent7b9d6622a4dd97075e8334f75dff9661e87e75ff (diff)
downloadwebsite-8ab05aa7c96bfb59ea6e50e0dfc6848a37e47447.tar.lz
website-8ab05aa7c96bfb59ea6e50e0dfc6848a37e47447.tar.zst
website-8ab05aa7c96bfb59ea6e50e0dfc6848a37e47447.zip
Use relative URLs in HTML
-rw-r--r--themes/bear/templates/base.html2
-rw-r--r--themes/bear/templates/header.html2
-rw-r--r--themes/bear/templates/nav.html4
-rw-r--r--themes/bear/templates/taxonomy_single.html6
4 files changed, 7 insertions, 7 deletions
diff --git a/themes/bear/templates/base.html b/themes/bear/templates/base.html
index 7fa1991..e3e68b4 100644
--- a/themes/bear/templates/base.html
+++ b/themes/bear/templates/base.html
@@ -8,7 +8,7 @@
   <meta name="referrer" content="no-referrer-when-downgrade">
   {%- if config.generate_feed %}
   {% block rss -%}
-  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filename) | safe }}">
+  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="/{{ config.feed_filename }}">
   {%- endblock -%}
   {%- endif %}
   <style>
diff --git a/themes/bear/templates/header.html b/themes/bear/templates/header.html
index abc74e5..55c1756 100644
--- a/themes/bear/templates/header.html
+++ b/themes/bear/templates/header.html
@@ -1,7 +1,7 @@
 <a class="skip" href="#content">Skip to main content</a>
 <header>
   <h2>
-    <a href="{{ config.base_url | safe }}" class="title">
+    <a href="/" class="title">
       {{- config.title -}}
     </a>
   </h2>
diff --git a/themes/bear/templates/nav.html b/themes/bear/templates/nav.html
index ba41879..579661e 100644
--- a/themes/bear/templates/nav.html
+++ b/themes/bear/templates/nav.html
@@ -1,10 +1,10 @@
-  <a href="{{ config.base_url | safe }}">Home</a>
+  <a href="/">Home</a>
 {%- if config.extra.main_menu %}
   {%- for item in config.extra.main_menu %}
     {%- if item.url is matching("https?://") %}
       <a href="{{ item.url | safe }}">{{ item.name }}</a>
     {%- else %}
-      <a href="{{ get_url(path=item.url) }}">{{ item.name }}</a>
+      <a href="{{ item.url }}">{{ item.name }}</a>
     {%- endif %}
   {%- endfor %}
 {%- endif -%}
diff --git a/themes/bear/templates/taxonomy_single.html b/themes/bear/templates/taxonomy_single.html
index 5ee2b88..a96139c 100644
--- a/themes/bear/templates/taxonomy_single.html
+++ b/themes/bear/templates/taxonomy_single.html
@@ -1,9 +1,9 @@
 {% extends "base.html" %}
 
 {% block rss -%}
-  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filename) | safe }}">
-  {%- set rss_path = "tags/" ~ term.name ~ "/" ~ config.feed_filename %}
-  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{% if term %}{{ term.name | title }}{% else %}{{ section.title | title }}{% endif %}" href="{{ get_url(path=rss_path) | safe }}">
+  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="/{{ config.feed_filename }}">
+  {%- set rss_path = "/tags/" ~ term.name ~ "/" ~ config.feed_filename %}
+  <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{% if term %}{{ term.name | title }}{% else %}{{ section.title | title }}{% endif %}" href="{{ rss_path }}">
 {%- endblock -%}
 
 {% block main -%}