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
# --------------------
permalink: /:title
permalink: /:title/
paginate: 15
paginate_path: "/page/:num"
category_dir: "/"

View File

@ -15,7 +15,7 @@
{{ post.content | markdownify }}
<p>
<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>
</section>
</article>
@ -39,13 +39,13 @@
<article class="hentry format-post">
<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>
<section class="entry-content">
{% if post.image %}
<a href="{{ post.url | append: '/' }}">
<a href="{{ post.url }}">
{% picture {{ post.image }} class="teaser" %}
</a>
{% endif %}
@ -64,7 +64,7 @@
<footer class="goodie-actions">
<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>
{% if post.download %}
@ -77,7 +77,7 @@
{% endif %}
{% 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 %}
</section>

View File

@ -59,16 +59,15 @@
{% endif %}
<!-- TypeKit -->
<script data-cfasync="false" src="//use.typekit.com/msu4qap.js"></script>
<script data-cfasync="false">try{Typekit.load();}catch(e){}</script>
<script src="//use.typekit.com/msu4qap.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<!-- Picturefill -->
<script src="/assets/js/picturefill.min.js" defer></script>
<!-- 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="{{ canonical }}">
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
<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">
{% endif %}
{% if page.url %}
{% capture canonical %}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %}
<meta content="{{ site.url }}{{ canonical }}" property="og:url">
<meta content="{{ site.url}}{{ page.url | replace:'index.html','' }}" property="og:url">
{% endif %}
{% if page.date %}
<meta content="{{ page.date | date_to_xmlschema }}" property="article:published_time">

View File

@ -12,7 +12,7 @@
<meta name="twitter:title" content="{{ site.title }}">
{% endif %}
{% 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 %}
{% if page.description %}
<meta name="twitter:description" content="{{ page.description }}">

View File

@ -18,7 +18,7 @@ layout: base
{{ content }}
<p>
<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>
</section>