mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Use absolute paths instead of permalink
This makes links also work in deploy previews.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>Latest post:
|
<p>Latest post:
|
||||||
{% set latest_post = posts|last %}
|
{% 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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -47,10 +47,10 @@
|
|||||||
<h1>{{ extra.title }}</h1>
|
<h1>{{ extra.title }}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for subsection in extra.subsections|reverse %}
|
{% 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 %}
|
{% endfor %}
|
||||||
{% for page in extra.pages|reverse %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% macro post_link(page) %}
|
{% macro post_link(page) %}
|
||||||
<article>
|
<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 }}
|
{{ page.summary | safe }}
|
||||||
</article>
|
</article>
|
||||||
{% endmacro post_link %}
|
{% endmacro post_link %}
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="PageNavigation">
|
<div class="PageNavigation">
|
||||||
{% if page.previous %}
|
{% if page.previous %}
|
||||||
<a class="prev" href="{{ page.previous.permalink | safe }}">« {{ page.previous.title }}</a>
|
<a class="prev" href="/{{ page.previous.path | safe }}">« {{ page.previous.title }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.next %}
|
{% if page.next %}
|
||||||
<a class="next" href="{{ page.next.permalink | safe }}">{{ page.next.title }} »</a>
|
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} »</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>Latest post:
|
<p>Latest post:
|
||||||
{% set latest_post = posts|last %}
|
{% 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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,10 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="PageNavigation">
|
<div class="PageNavigation">
|
||||||
{% if page.previous %}
|
{% if page.previous %}
|
||||||
<a class="prev" href="{{ page.previous.permalink | safe }}">« {{ page.previous.title }}</a>
|
<a class="prev" href="/{{ page.previous.path | safe }}">« {{ page.previous.title }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.next %}
|
{% if page.next %}
|
||||||
<a class="next" href="{{ page.next.permalink | safe }}">{{ page.next.title }} »</a>
|
<a class="next" href="/{{ page.next.path | safe }}">{{ page.next.title }} »</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user