Skip to content

Commit

Permalink
Unify local links to posts (barryclark#65).
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed May 28, 2020
1 parent db5eb0a commit 171faaf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _includes/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h3 data-toc-skip>
{% 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>

Expand Down
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="pl-lg-2">
<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>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% 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>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="pl-lg-2">
<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>
Expand Down
2 changes: 1 addition & 1 deletion tabs/archives.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 171faaf

Please sign in to comment.