From d268544143bf0ebbf538d2a0b8d191d4169db63a Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 6 Oct 2016 15:40:30 -0400 Subject: [PATCH] Replace base_path with `absolute_url` filter where possible --- _includes/archive-single.html | 8 +++----- _includes/author-profile.html | 4 +--- _includes/breadcrumbs.html | 6 ++---- _includes/category-list.html | 4 +--- _includes/comments.html | 6 ++---- _includes/feature_row | 6 ++---- _includes/footer.html | 4 +--- _includes/gallery | 8 +++----- _includes/head.html | 6 ++---- _includes/masthead.html | 8 +++----- _includes/nav_list | 11 +++++------ _includes/page__hero.html | 8 +++----- _includes/page__taxonomy.html | 2 -- _includes/paginator.html | 12 +++++------- _includes/post_pagination.html | 6 ++---- _includes/scripts.html | 2 +- _includes/seo.html | 18 ++++++++---------- _includes/sidebar.html | 4 +--- _includes/social-share.html | 10 ++++------ _includes/tag-list.html | 4 +--- _layouts/archive-taxonomy.html | 1 - _layouts/default.html | 2 -- _layouts/single.html | 2 -- _layouts/splash.html | 2 -- 24 files changed, 50 insertions(+), 94 deletions(-) diff --git a/_includes/archive-single.html b/_includes/archive-single.html index f7e3350..141704d 100644 --- a/_includes/archive-single.html +++ b/_includes/archive-single.html @@ -1,5 +1,3 @@ -{% include base_path %} - {% if post.header.teaser %} {% capture teaser %}{{ post.header.teaser }}{% endcapture %} {% else %} @@ -20,16 +18,16 @@ {% if teaser contains "://" %} "{{ teaser }}" {% else %} - "{{ teaser | prepend: "/" | prepend: base_path }}" + "{{ teaser | prepend: "/" | absolute_url }}" {% endif %} alt=""> {% endif %}

{% if post.link %} - {{ title }} Permalink + {{ title }} Permalink {% else %} - {{ title }} + {{ title }} {% endif %}

{% if post.read_time %} diff --git a/_includes/author-profile.html b/_includes/author-profile.html index 59d499d..5d89339 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -1,5 +1,3 @@ -{% include base_path %} - {% if page.author and site.data.authors[page.author] %} {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.author %} {% endif %} @@ -10,7 +8,7 @@ {% if author.avatar contains "://" %} {{ author.name }} {% else %} - {{ author.name }} + {{ author.name }} {% endif %} diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs.html index 2b9f7a9..cf2b745 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/breadcrumbs.html @@ -1,5 +1,3 @@ -{% include base_path %} - {% case site.categories.type %} {% when "liquid" %} {% assign path_type = "#" %} @@ -21,7 +19,7 @@ {% for crumb in crumbs offset: 1 %} {% if forloop.first %}
  • - {{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }} + {{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}
  • {{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }} @@ -31,7 +29,7 @@ {% else %} {% assign i = i | plus: 1 %}
  • - {{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }} + {{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}
  • {{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }} diff --git a/_includes/category-list.html b/_includes/category-list.html index 4c27427..039d5e2 100644 --- a/_includes/category-list.html +++ b/_includes/category-list.html @@ -1,5 +1,3 @@ -{% include base_path %} - {% case site.category_archive.type %} {% when "liquid" %} {% assign path_type = "#" %} @@ -21,7 +19,7 @@ {% for hash in category_hashes %} {% assign keyValue = hash | split: '#' %} {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} - {% unless forloop.last %}, {% endunless %} + {% unless forloop.last %}, {% endunless %} {% endfor %}

    diff --git a/_includes/comments.html b/_includes/comments.html index 39b4983..e145997 100644 --- a/_includes/comments.html +++ b/_includes/comments.html @@ -1,5 +1,3 @@ -{% include base_path %} -
    {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} {% case site.comments.provider %} @@ -8,10 +6,10 @@
    {% when "facebook" %}

    {{ comments_label }}

    -
    +
    {% when "google-plus" %}

    {{ comments_label }}

    -
    Loading Google+ Comments ...
    +
    Loading Google+ Comments ...
    {% when "staticman" %}
    {% if site.repository and site.staticman.branch %} diff --git a/_includes/feature_row b/_includes/feature_row index 0c6e319..75b6cb8 100644 --- a/_includes/feature_row +++ b/_includes/feature_row @@ -1,5 +1,3 @@ -{% include base_path %} - {% if include.id %} {% assign feature_row = page.[include.id] %} {% else %} @@ -13,7 +11,7 @@ {% if f.url contains "://" %} {% capture f_url %}{{ f.url }}{% endcapture %} {% else %} - {% capture f_url %}{{ f.url | prepend: "/" | prepend: base_path }}{% endcapture %} + {% capture f_url %}{{ f.url | prepend: "/" | absolute_url }}{% endcapture %} {% endif %}
    @@ -24,7 +22,7 @@ {% if f.image_path contains "://" %} "{{ f.image_path }}" {% else %} - "{{ f.image_path | prepend: "/" | prepend: base_path }}" + "{{ f.image_path | prepend: "/" | absolute_url }}" {% endif %} alt="{% if f.alt %}{{ f.alt }}{% endif %}">
    diff --git a/_includes/footer.html b/_includes/footer.html index 53b99eb..8fe13bb 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,5 +1,3 @@ -{% include base_path %} - diff --git a/_includes/gallery b/_includes/gallery index 6c8e4b8..cb5c778 100644 --- a/_includes/gallery +++ b/_includes/gallery @@ -1,5 +1,3 @@ -{% include base_path %} - {% if include.id %} {% assign gallery = page.[include.id] %} {% else %} @@ -21,7 +19,7 @@ {% if img.url contains "://" %} "{{ img.url }}" {% else %} - "{{ img.url | prepend: "/" | prepend: base_path }}" + "{{ img.url | prepend: "/" | absolute_url }}" {% endif %} {% if img.title %}title="{{ img.title }}"{% endif %} > @@ -29,7 +27,7 @@ {% if img.image_path contains "://" %} "{{ img.image_path }}" {% else %} - "{{ img.image_path | prepend: "/" | prepend: base_path }}" + "{{ img.image_path | prepend: "/" | absolute_url }}" {% endif %} alt="{% if img.alt %}{{ img.alt }}{% endif %}"> @@ -38,7 +36,7 @@ {% if img.image_path contains "://" %} "{{ img.image_path }}" {% else %} - "{{ img.image_path | prepend: "/" | prepend: base_path }}" + "{{ img.image_path | prepend: "/" | absolute_url }}" {% endif %} alt="{% if img.alt %}{{ img.alt }}{% endif %}"> {% endif %} diff --git a/_includes/head.html b/_includes/head.html index ffcc741..a59b14a 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,10 +1,8 @@ -{% include base_path %} - {% include seo.html %} - + @@ -16,6 +14,6 @@ - + \ No newline at end of file diff --git a/_includes/masthead.html b/_includes/masthead.html index ffef559..5e9a1d5 100644 --- a/_includes/masthead.html +++ b/_includes/masthead.html @@ -1,17 +1,15 @@ -{% include base_path %} -