1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

switch to leading trailing slash urls

This commit is contained in:
Matthias Kretschmann 2014-08-31 18:24:01 +02:00
parent 44b57208c1
commit 9aea9c07fd
6 changed files with 12 additions and 14 deletions

View File

@ -20,7 +20,7 @@ email: m@kretschmann.io
# Urls # Urls
# -------------------- # --------------------
permalink: /:title permalink: /:title/
paginate: 15 paginate: 15
paginate_path: "/page/:num" paginate_path: "/page/:num"
category_dir: "/" category_dir: "/"

View File

@ -15,7 +15,7 @@
{{ post.content | markdownify }} {{ post.content | markdownify }}
<p> <p>
<a class="more-link" href="{{ post.linkurl }}">Go to source <i class="icon icon-forward"></i></a> <a class="more-link" href="{{ post.linkurl }}">Go to source <i class="icon icon-forward"></i></a>
<a class="permalink-link" href="{{ post.url | append: '/' }}" rel="tooltip" title="Permalink">&#8734;</a> <a class="permalink-link" href="{{ post.url }}" rel="tooltip" title="Permalink">&#8734;</a>
</p> </p>
</section> </section>
</article> </article>
@ -39,13 +39,13 @@
<article class="hentry format-post"> <article class="hentry format-post">
<header> <header>
<h1 class="entry-title"><a href="{{ post.url | append: '/' }}">{{ post.title | titlecase }}</a></h1> <h1 class="entry-title"><a href="{{ post.url }}">{{ post.title | titlecase }}</a></h1>
</header> </header>
<section class="entry-content"> <section class="entry-content">
{% if post.image %} {% if post.image %}
<a href="{{ post.url | append: '/' }}"> <a href="{{ post.url }}">
{% picture {{ post.image }} class="teaser" %} {% picture {{ post.image }} class="teaser" %}
</a> </a>
{% endif %} {% endif %}
@ -64,7 +64,7 @@
<footer class="goodie-actions"> <footer class="goodie-actions">
<p class="info col3"> <p class="info col3">
<a class="btn icon icon-info" href="{{ post.url | append: '/' }}">Release Post</a> <a class="btn icon icon-info" href="{{ post.url }}">Release Post</a>
</p> </p>
{% if post.download %} {% if post.download %}
@ -77,7 +77,7 @@
{% endif %} {% endif %}
{% unless page.path contains "goodies" %} {% unless page.path contains "goodies" %}
<a class="more-link" href="{{ post.url | append: '/' }}">Continue reading <i class="icon icon-arrow-right"></i></a> <a class="more-link" href="{{ post.url }}">Continue reading <i class="icon icon-arrow-right"></i></a>
{% endunless %} {% endunless %}
</section> </section>

View File

@ -59,16 +59,15 @@
{% endif %} {% endif %}
<!-- TypeKit --> <!-- TypeKit -->
<script data-cfasync="false" src="//use.typekit.com/msu4qap.js"></script> <script src="//use.typekit.com/msu4qap.js"></script>
<script data-cfasync="false">try{Typekit.load();}catch(e){}</script> <script>try{Typekit.load();}catch(e){}</script>
<!-- Picturefill --> <!-- Picturefill -->
<script src="/assets/js/picturefill.min.js" defer></script> <script src="/assets/js/picturefill.min.js" defer></script>
<!-- Canonical URL --> <!-- Canonical URL -->
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} <link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
<link rel="canonical" href="{{ canonical }}">
<link rel="alternate" href="{{ site.url }}/feed/" type="application/rss+xml" title="Posts Feed"/> <link rel="alternate" href="{{ site.url }}/feed/" type="application/rss+xml" title="Posts Feed"/>

View File

@ -19,8 +19,7 @@
<meta content="{{ page.excerpt | strip_html | strip_newlines }}" property="og:description"> <meta content="{{ page.excerpt | strip_html | strip_newlines }}" property="og:description">
{% endif %} {% endif %}
{% if page.url %} {% if page.url %}
{% capture canonical %}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} <meta content="{{ site.url}}{{ page.url | replace:'index.html','' }}" property="og:url">
<meta content="{{ site.url }}{{ canonical }}" property="og:url">
{% endif %} {% endif %}
{% if page.date %} {% if page.date %}
<meta content="{{ page.date | date_to_xmlschema }}" property="article:published_time"> <meta content="{{ page.date | date_to_xmlschema }}" property="article:published_time">

View File

@ -12,7 +12,7 @@
<meta name="twitter:title" content="{{ site.title }}"> <meta name="twitter:title" content="{{ site.title }}">
{% endif %} {% endif %}
{% if page.url %} {% if page.url %}
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}"> <meta name="twitter:url" content="{{ site.url}}{{ page.url | replace:'index.html','' }}">
{% endif %} {% endif %}
{% if page.description %} {% if page.description %}
<meta name="twitter:description" content="{{ page.description }}"> <meta name="twitter:description" content="{{ page.description }}">

View File

@ -18,7 +18,7 @@ layout: base
{{ content }} {{ content }}
<p> <p>
<a class="more-link" href="{{ page.linkurl }}">Go to source <i class="icon icon-forward"></i></a> <a class="more-link" href="{{ page.linkurl }}">Go to source <i class="icon icon-forward"></i></a>
<a class="permalink-link" href="{{ page.url | append: '/' }}" rel="tooltip" title="Permalink">&#8734;</a> <a class="permalink-link" href="{{ page.url }}" rel="tooltip" title="Permalink">&#8734;</a>
</p> </p>
</section> </section>