Skip to content

Commit b29e4bf

Browse files
committedNov 4, 2016
Replace base_path with absolute_url filter
1 parent bdca8ca commit b29e4bf

File tree

9 files changed

+8
-17
lines changed

9 files changed

+8
-17
lines changed
 

‎_includes/comments-providers/discourse.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{% if site.comments.discourse.server %}
2-
{% include base_path %}
3-
{% capture canonical %}{{ base_path }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
2+
{% capture canonical %}{% if site.permalink contains '.html' %}{{ page.url | absolute_url }}{% else %}{{ page.url | absolute_url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
43
<script type="text/javascript">
54
DiscourseEmbed = { discourseUrl: '//{{ site.comments.discourse.server }}/',
65
discourseEmbedUrl: '{{ canonical }}' };

‎_includes/paginator.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
{% if paginator.page == paginator.total_pages %}
5555
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
5656
{% else %}
57-
<li><a href="{{ base_path }}/page{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
57+
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
5858
{% endif %}
5959

6060
{% comment %} Link next page {% endcomment %}
6161
{% if paginator.next_page %}
62-
<li><a href="{{ base_path }}/page{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
62+
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
6363
{% else %}
6464
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
6565
{% endif %}

‎_layouts/home.html

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
layout: archive
33
---
44

5-
{% include base_path %}
6-
75
<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>
86

97
{% for post in paginator.posts %}

‎docs/_includes/comments-providers/discourse.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{% if site.comments.discourse.server %}
2-
{% include base_path %}
3-
{% capture canonical %}{{ base_path }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
2+
{% capture canonical %}{% if site.permalink contains '.html' %}{{ page.url | absolute_url }}{% else %}{{ page.url | absolute_url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
43
<script type="text/javascript">
54
DiscourseEmbed = { discourseUrl: '//{{ site.comments.discourse.server }}/',
65
discourseEmbedUrl: '{{ canonical }}' };

‎docs/_includes/paginator.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
{% if paginator.page == paginator.total_pages %}
5555
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
5656
{% else %}
57-
<li><a href="{{ base_path }}/page{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
57+
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
5858
{% endif %}
5959

6060
{% comment %} Link next page {% endcomment %}
6161
{% if paginator.next_page %}
62-
<li><a href="{{ base_path }}/page{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
62+
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
6363
{% else %}
6464
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
6565
{% endif %}

‎docs/_layouts/home.html

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
layout: archive
33
---
44

5-
{% include base_path %}
6-
75
<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>
86

97
{% for post in paginator.posts %}

‎docs/_pages/archive-layout-with-content.md

-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ Still sticking with science and Isaac Newton's E = MC<sup>2</sup>, which should
213213

214214
This allows you to denote <var>variables</var>.
215215

216-
{% include base_path %}
217216
{% for post in site.pages %}
218217
{% include archive-single.html %}
219218
{% endfor %}

‎docs/_pages/sitemap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: /sitemap/
55
author_profile: false
66
---
77

8-
A list of all the posts and pages found on the site. For you robots out there is an [XML version]({{ base_path }}/sitemap.xml) available for digesting as well.
8+
A list of all the posts and pages found on the site. For you robots out there is an [XML version]({{ "sitemap.xml" | absolute_url }}) available for digesting as well.
99

1010
<h2>Pages</h2>
1111
{% for post in site.pages %}

‎docs/_posts/2010-08-07-post-image-caption.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ tags:
77
- Post Formats
88
---
99

10-
{% include base_path %}
11-
1210
{% capture fig_img %}
13-
![Foo]({{ basepath }}/assets/images/unsplash-gallery-image-3.jpg)
11+
![Foo]({{ "/assets/images/unsplash-gallery-image-3.jpg" | absolute_url }})
1412
{% endcapture %}
1513

1614
<figure>

0 commit comments

Comments
 (0)
Please sign in to comment.