[Git][reproducible-builds/diffoscope-website][master] 2 commits: Use relative_url over prepend.

Chris Lamb gitlab at salsa.debian.org
Fri May 29 09:15:49 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope-website


Commits:
bccda6ea by Chris Lamb at 2020-05-29T10:13:36+01:00
Use relative_url over prepend.

- - - - -
0e56f3c3 by Chris Lamb at 2020-05-29T10:15:25+01:00
Use absolute_url where we can.

- - - - -


4 changed files:

- _includes/sidebar.html
- _layouts/default.html
- feed.xml
- index.md


Changes:

=====================================
_includes/sidebar.html
=====================================
@@ -3,7 +3,7 @@
     <div class="sidebar-about">
       <div class="brand">
         <a href="{{ site.baseurl }}">
-          <img src="{{ "static/images/diffoscope.png" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}">
+          <img src="{{ "static/images/diffoscope.png" | relative_url }}?{{ site.time | date: '%s%N' }}">
         </a>
       </div>
       <h1>


=====================================
_layouts/default.html
=====================================
@@ -6,11 +6,11 @@
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <meta name="referrer" content="same-origin" />
   <title>{{ page.title }}</title>
-  <link href="{{ "static/css/poole.css" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" />
-  <link href="{{ "static/css/syntax.css" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" media="screen" />
-  <link href="{{ "static/css/hyde.css" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" media="screen" />
-  <link href="{{ "static/css/custom.css" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" media="screen" />
-  <link rel="alternate" type="application/rss+xml" title="{{ site.title }}: {{ site.description }}" href="{{ "feed.xml" | prepend: site.baseurl }}"/>
+  <link href="{{ "static/css/poole.css" | relative_url }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" />
+  <link href="{{ "static/css/syntax.css" | relative_url }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" media="screen" />
+  <link href="{{ "static/css/hyde.css" | relative_url }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" media="screen" />
+  <link href="{{ "static/css/custom.css" | relative_url }}?{{ site.time | date: '%s%N' }}" rel="stylesheet" media="screen" />
+  <link rel="alternate" type="application/rss+xml" title="{{ site.title }}: {{ site.description }}" href="{{ "feed.xml" | relative_url }}"/>
 </head>
 
 <body class="theme-base-diffoscope">
@@ -24,7 +24,7 @@
     <footer>
       <p>
         <a href="https://reproducible-builds.org/">
-          <img src="{{ "static/images/reproducible-builds.svg" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}">
+          <img src="{{ "static/images/reproducible-builds.svg" | relative_url }}?{{ site.time | date: '%s%N' }}">
         </a>
       </p>
 


=====================================
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" | absolute_url }}" rel="self" type="application/rss+xml" />
     <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
     <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
     {% for post in site.posts limit:10 %}
@@ -15,8 +15,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.url }}</link>
-        <guid isPermaLink="true">{{ post.url | prepend: site.url }}</guid>
+        <link>{{ post.url | absolute_url }}</link>
+        <guid isPermaLink="true">{{ post.url | absolute_url }}</guid>
       </item>
     {% endfor %}
   </channel>


=====================================
index.md
=====================================
@@ -31,19 +31,19 @@ You can try it now using Docker:
 
 ## Examples
 
-[![Example of diffoscope HTML output]({{ "examples/https-everywhere-5.0.6_vs_5.0.7.thumbnail.png" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }})]({{ "examples/https-everywhere-5.0.6_vs_5.0.7.html"  | prepend: site.baseurl }})
+[![Example of diffoscope HTML output]({{ "examples/https-everywhere-5.0.6_vs_5.0.7.thumbnail.png" | relative_url }}?{{ site.time | date: '%s%N' }})]({{ "examples/https-everywhere-5.0.6_vs_5.0.7.html"  | relative_url }})
 
-[Firefox extensions compared (HTML output)]({{ "examples/https-everywhere-5.0.6_vs_5.0.7.html" | prepend: site.baseurl }})
+[Firefox extensions compared (HTML output)]({{ "examples/https-everywhere-5.0.6_vs_5.0.7.html" | relative_url }})
 
-[![Example of diffoscope text output]({{ "examples/igerman98_20131206-5.thumbnail.png" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }})]({{ "examples/igerman98_20131206-5.txt" | prepend: site.baseurl }})
+[![Example of diffoscope text output]({{ "examples/igerman98_20131206-5.thumbnail.png" | relative_url }}?{{ site.time | date: '%s%N' }})]({{ "examples/igerman98_20131206-5.txt" | relative_url }})
 
-[Debian packages compared (text output)]({{ "/examples/igerman98_20131206-5.txt" | prepend: site.baseurl }})
+[Debian packages compared (text output)]({{ "/examples/igerman98_20131206-5.txt" | relative_url }})
 
 … and more [examples on tests.reproducible-builds.org](https://tests.reproducible-builds.org/debian/unstable/amd64/index_FTBR.html).
 
 ## Demo
 
-<img src="{{ "static/images/progressbar.gif" | prepend: site.baseurl }}?{{ site.time | date: '%s%N' }}">
+<img src="{{ "static/images/progressbar.gif" | relative_url }}?{{ site.time | date: '%s%N' }}">
 
 ## Features
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope-website/-/compare/eecfbaf640cf939b14e495b489dbcbfab6134574...0e56f3c3129357f481fd14947e46e15c40e5bf39

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope-website/-/compare/eecfbaf640cf939b14e495b489dbcbfab6134574...0e56f3c3129357f481fd14947e46e15c40e5bf39
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200529/77ca402e/attachment.htm>


More information about the rb-commits mailing list