Skip to content

Commit 5b54436

Browse files
committed
Unify local links to posts (cotes2020#65).
1 parent 1e49a7e commit 5b54436

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

_includes/panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h3 data-toc-skip>
2727
{% assign post = site.posts | where: "url", post_url | first %}
2828

2929
{% if post %}
30-
{% assign url = post.url | prepend: site.baseurl %}
30+
{% assign url = post.url | relative_url %}
3131

3232
<li><a href="{{ url }}">{{ post.title }}</a></li>
3333

_includes/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<div class="profile-text mt-3">
2323
<div id="site-title">
24-
<a href="{{ site.baseurl }}/">{{- site.title -}}</a>
24+
<a href="{{ '/' | relative_url }}">{{- site.title -}}</a>
2525
</div>
2626
<div id="site-subtitle" class="font-italic">{{- site.tagline -}}</div>
2727
</div>

_layouts/category.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1 class="pl-lg-2">
1616
<ul class="post-content pl-0">
1717
{% for post in site.categories[page.category] %}
1818
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
19-
<a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
19+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
2020
<span class="dash flex-grow-1"></span>
2121
<span class="text-muted small">{{ post.date | date: site.data.date_format.post }}</span>
2222
</li>

_layouts/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% for post in paginator.posts %}
1212
<div class="post-preview">
1313
<h1>
14-
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
14+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
1515
</h1>
1616
<div class="post-content">
1717
<p>

_layouts/tag.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1 class="pl-lg-2">
1616
<ul class="post-content pl-0">
1717
{% for post in site.tags[page.tag] %}
1818
<li class="d-flex justify-content-between pl-md-3 pr-md-3">
19-
<a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
19+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
2020
<span class="dash flex-grow-1"></span>
2121
<span class="text-muted small">{{ post.date | date: site.data.date_format.post }}</span>
2222
</li>

tabs/archives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ title: Archives
2424
{% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %}
2525
<span class="date day">{{ this_day }}</span>
2626
<span class="date month small text-muted">{{ this_month }}</span>
27-
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
27+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
2828
</div>
2929
</li>
3030
{% if forloop.last %}

0 commit comments

Comments
 (0)