posts: add link to reddit page, if it exists
[web.git] / ralf / _layouts / page.html
index a45f67fa3f0039624c099a218b7c7747fcab0d94..420891973ef71bfddf24e26d3cb052566c9876e0 100644 (file)
@@ -13,7 +13,7 @@
     {% if page.excerpt %}<meta name="description" content="{{ page.excerpt | newline_to_br | replace:'<br />',' ' | strip_html | strip_newlines | truncate: 192 }}">{% endif %}
 
     <link rel="stylesheet" href="{{ site.baseurl }}/style.css">
-    <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'/index.html','/' }}">
+    <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}">
     {% if page.rss %}
         <link rel="alternate" type="application/atom+xml" title="{{ site.blog.title }}" href="{{ site.baseurl }}/blog/feed.xml" />
         {% if page.category %}<link rel="alternate" type="application/atom+xml" title="{{ site.blog.title }} • {{ title }}" href="{{ site.baseurl }}{{ page.url | replace: '.html','.xml' }}" />{% endif %}
@@ -44,7 +44,9 @@
 
       {{ content }}
 
-      {% if page.post %}<p class="comment">Comments? <a href="mailto:post-AT-ralfj-DOT-de">Drop me a mail</a>!</p>{% endif %}
+      {% if page.post %}
+        <p class="comment">Comments? <a href="mailto:post-AT-ralfj-DOT-de">Drop me a mail</a>{% if page.reddit %} or <a href="https://www.reddit.com/r{{ page.reddit }}">leave a note on reddit</a>{% endif %}!</p>
+      {% endif %}
     </article>
 
   </div></body>