Use relative URLs in HTML
Alan Pearce alan@alanpearce.eu
Thu, 06 Jul 2023 20:31:08 +0200
4 files changed, 7 insertions(+), 7 deletions(-)
M themes/bear/templates/base.html → themes/bear/templates/base.html
@@ -8,7 +8,7 @@ <title>{%- block title %}{{ config.title }}{%- endblock %}</title> <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>
M themes/bear/templates/header.html → 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>
M themes/bear/templates/taxonomy_single.html → 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 -%}