Use absolute paths instead of permalink

This makes links also work in deploy previews.
This commit is contained in:
Philipp Oppermann
2018-01-19 14:20:20 +01:00
parent 7a263355f3
commit 25441a8773
5 changed files with 9 additions and 9 deletions

View File

@@ -16,7 +16,7 @@
</p>
<p>Latest post:
{% set latest_post = posts|last %}
<strong><a href="{{ latest_post.permalink | safe }}">{{ latest_post.title }}</a></strong>
<strong><a href="/{{ latest_post.path | safe }}">{{ latest_post.title }}</a></strong>
</p>
</div>
@@ -47,10 +47,10 @@
<h1>{{ extra.title }}</h1>
<ul>
{% for subsection in extra.subsections|reverse %}
<li><a href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a></li>
<li><a href="/{{ subsection.path | safe }}">{{ subsection.title }}</a></li>
{% endfor %}
{% for page in extra.pages|reverse %}
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
<li><a href="/{{ page.path | safe }}">{{ page.title }}</a></li>
{% endfor %}
</ul>

View File

@@ -1,6 +1,6 @@
{% macro post_link(page) %}
<article>
<h2 class="post-title"><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h2>
<h2 class="post-title"><a href="/{{ page.path | safe }}">{{ page.title }}</a></h2>
{{ page.summary | safe }}
</article>
{% endmacro post_link %}

View File

@@ -28,10 +28,10 @@
<hr>
<div class="PageNavigation">
{% if page.previous %}
<a class="prev" href="{{ page.previous.permalink | safe }}">&laquo; {{ page.previous.title }}</a>
<a class="prev" href="/{{ page.previous.path | safe }}">&laquo; {{ page.previous.title }}</a>
{% endif %}
{% if page.next %}
<a class="next" href="{{ page.next.permalink | safe }}">{{ page.next.title }} &raquo;</a>
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} &raquo;</a>
{% endif %}
</div>

View File

@@ -19,7 +19,7 @@
</p>
<p>Latest post:
{% set latest_post = posts|last %}
<strong><a href="{{ latest_post.permalink | safe }}">{{ latest_post.title }}</a></strong>
<strong><a href="/{{ latest_post.path | safe }}">{{ latest_post.title }}</a></strong>
</p>
</div>

View File

@@ -31,10 +31,10 @@
<hr>
<div class="PageNavigation">
{% if page.previous %}
<a class="prev" href="{{ page.previous.permalink | safe }}">&laquo; {{ page.previous.title }}</a>
<a class="prev" href="/{{ page.previous.path | safe }}">&laquo; {{ page.previous.title }}</a>
{% endif %}
{% if page.next %}
<a class="next" href="{{ page.next.permalink | safe }}">{{ page.next.title }} &raquo;</a>
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} &raquo;</a>
{% endif %}
</div>