Unify local links to posts (#65).

This commit is contained in:
Cotes Chung 2020-05-29 01:55:57 +08:00
parent db5eb0a18a
commit 171faafc67
6 changed files with 6 additions and 6 deletions

View file

@ -27,7 +27,7 @@
{% assign post = site.posts | where: "url", post_url | first %}
{% if post %}
{% assign url = post.url | prepend: site.baseurl %}
{% assign url = post.url | relative_url %}
<li><a href="{{ url }}">{{ post.title }}</a></li>

View file

@ -21,7 +21,7 @@
<div class="profile-text mt-3">
<div id="site-title">
<a href="{{ site.baseurl }}/">{{- site.title -}}</a>
<a href="{{ '/' | relative_url }}">{{- site.title -}}</a>
</div>
<div id="site-subtitle" class="font-italic">{{- site.tagline -}}</div>
</div>

View file

@ -16,7 +16,7 @@ layout: page
<ul class="post-content pl-0">
{% for post in site.categories[page.category] %}
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
<a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span>
<span class="text-muted small">{{ post.date | date: site.data.date_format.post }}</span>
</li>

View file

@ -11,7 +11,7 @@ layout: page
{% for post in paginator.posts %}
<div class="post-preview">
<h1>
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
</h1>
<div class="post-content">
<p>

View file

@ -16,7 +16,7 @@ layout: page
<ul class="post-content pl-0">
{% for post in site.tags[page.tag] %}
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
<a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span>
<span class="text-muted small">{{ post.date | date: site.data.date_format.post }}</span>
</li>

View file

@ -24,7 +24,7 @@ title: Archives
{% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %}
<span class="date day">{{ this_day }}</span>
<span class="date month small text-muted">{{ this_month }}</span>
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
</div>
</li>
{% if forloop.last %}