hivedav-website

Website for HiveDAV
git clone https://git.in0rdr.ch/hivedav-website.git
Log | Files | Refs | README | LICENSE

commit a986166fe57af2859edbed007e0d3342d15647d8
parent ad3dc33dc54f2fe1629b10b0fb592128de51880d
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Fri, 21 Apr 2023 01:21:49 +0200

fix: use relative_url

Diffstat:
M_includes/comments.html | 2+-
M_includes/head.html | 16++++++++--------
M_includes/nav.html | 2+-
M_includes/post-share.html | 7+++----
Mfeed.xml | 6+++---
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="{{ '/about' | prepend: site.baseurl | prepend: site.url }}">About me</a></li> <li><a href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" target="_blank">RSS</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}}&amp;url={{ page.url | prepend: site.baseurl | prepend: site.url }}&amp;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}}&amp;url={{ page.url | relative_url }}&amp;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 %}