commit fdb87724ad4c68fdda3c341aac64e120d66dac1f
parent 002336ba78c5849c05dbbff582de2c47778d72f1
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Fri, 21 Apr 2023 01:21:49 +0200
fix: use relative_url
Diffstat:
5 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/_includes/comments.html b/_includes/comments.html
@@ -9,7 +9,7 @@
var disqus_shortname = '{{ site.disqus_shortname }}';
var disqus_identifier = '{{ page.id }}';
var disqus_title = "{{ page.title }}";
- var disqus_url = '{{ page.url | prepend: site.baseurl | prepend: site.url }}';
+ var disqus_url = '{{ page.url | relative_url }}';
/*var disqus_developer = 1;*/
(function() {
diff --git a/_includes/head.html b/_includes/head.html
@@ -47,9 +47,9 @@
{% assign page_image = '' %}
{% capture page_image %}
{% if page.cover %}
- {{ page.cover | prepend: site.baseurl | prepend: site.url }}
+ {{ page.cover | relative_url }}
{% else %}
- {{ site.cover | prepend: site.baseurl | prepend: site.url }}
+ {{ site.cover | relative_url }}
{% endif %}
{% endcapture %}
{% capture page_image %}{{ page_image | strip | rstrip | lstrip | escape | strip_newlines }}{% endcapture %}
@@ -64,7 +64,7 @@
{% else%}
<meta property="og:type" content="website">
{% endif %}
- <meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
+ <meta property="og:url" content="{{ page.url | replace:'index.html','' | relative_url }}">
<meta property="og:title" content="{{ page_title }}">
<meta property="og:image" content="{{ page_image }}">
<meta property="og:description" content="{{ page_description }}">
@@ -84,16 +84,16 @@
<meta itemprop="image" content="{{ page_image }}">
<!-- Canonical link tag -->
- <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
- <link rel="alternate" type="application/rss+xml" title="{{ site.title_left }}{{ site.title_right }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}">
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title_left }}{{ site.title_right }}" href="{{ "/feed.xml" | relative_url }}">
<!-- rel prev and next -->
{% if paginator.previous_page %}
- <link rel="prev" href="{{ paginator.previous_page_path | prepend: site.baseurl | prepend: site.url }}">
+ <link rel="prev" href="{{ paginator.previous_page_path | relative_url }}">
{% endif %}
{% if paginator.next_page %}
- <link rel="next" href="{{ paginator.next_page_path | prepend: site.baseurl | prepend: site.url }}">
+ <link rel="next" href="{{ paginator.next_page_path | relative_url }}">
{% endif %}
- <link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl | prepend: site.url }}">
+ <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
</head>
diff --git a/_includes/nav.html b/_includes/nav.html
@@ -1,7 +1,7 @@
<nav class="nav">
<div class="container">
- <h1 class="logo"><a href="{{ '/' | prepend: site.baseurl | prepend: site.url }}">{{ site.title_left }}<span>{{ site.title_right }}</span></a></h1>
+ <h1 class="logo"><a href="{{ '/' | relative_url }}">{{ site.title_left }}<span>{{ site.title_right }}</span></a></h1>
<ul class="navbar">
<li><a href="https://code.in0rdr.ch/myheats">{% octicon repo %}<span> src</span></a></li>
<li><a href="https://web.libera.chat/gamja/#myheats">{% octicon comment-discussion %}<span> irc</span></a></li>
diff --git a/_includes/post-share.html b/_includes/post-share.html
@@ -1,8 +1,8 @@
{% if site.postshare_enabled %}
<aside class="share">
- <p>If you liked this article and think others should read it, please share it on <a href="http://twitter.com/share?text={{page.title}}&url={{ page.url | prepend: site.baseurl | prepend: site.url }}&via={{ site.twitter_username }}"
- onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">Twitter</a> or <a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | prepend: site.baseurl | prepend: site.url }}" onclick="window.open(this.href, 'facebook-share', 'width=550,height=235');return false;">Facebook</a>.</p>
+ <p>If you liked this article and think others should read it, please share it on <a href="http://twitter.com/share?text={{page.title}}&url={{ page.url | relative_url }}&via={{ site.twitter_username }}"
+ onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">Twitter</a> or <a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | relative_url }}" onclick="window.open(this.href, 'facebook-share', 'width=550,height=235');return false;">Facebook</a>.</p>
</aside>
-{% endif %}
-\ No newline at end of file
+{% endif %}
diff --git a/feed.xml b/feed.xml
@@ -7,7 +7,7 @@ layout: null
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
- <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
+ <atom:link href="{{ "/feed.xml" | relative_url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
@@ -16,8 +16,8 @@ layout: null
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
- <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
- <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
+ <link>{{ post.url | relative_url }}</link>
+ <guid isPermaLink="true">{{ post.url | relative_url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}