~xdavidwu/xdavidwu.link

12fb35b73b7e003d7a89f529f28ededfe910acdb — Michael Rose 8 years ago f098a12
Replace `base_path` with `absolute_url` filter
3 files changed, 3 insertions(+), 6 deletions(-)

M _includes/comments-providers/discourse.html
M _includes/paginator.html
M _layouts/home.html
M _includes/comments-providers/discourse.html => _includes/comments-providers/discourse.html +1 -2
@@ 1,6 1,5 @@
{% if site.comments.discourse.server %}
{% include base_path %}
{% capture canonical %}{{ base_path }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
{% capture canonical %}{% if site.permalink contains '.html' %}{{ page.url | absolute_url }}{% else %}{{ page.url | absolute_url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
<script type="text/javascript">
    DiscourseEmbed = { discourseUrl: '//{{ site.comments.discourse.server }}/',
                       discourseEmbedUrl: '{{ canonical }}' };

M _includes/paginator.html => _includes/paginator.html +2 -2
@@ 54,12 54,12 @@
    {% if paginator.page == paginator.total_pages %}
      <li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
    {% else %}
      <li><a href="{{ base_path }}/page{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
      <li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
    {% endif %}

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

M _layouts/home.html => _layouts/home.html +0 -2
@@ 2,8 2,6 @@
layout: archive
---

{% include base_path %}

<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}</h3>

{% for post in paginator.posts %}