Replace base_path with absolute_url filter where possible

This commit is contained in:
Michael Rose 2016-10-06 15:40:30 -04:00
parent 7700d3b8ed
commit c3c0fc3f51
24 changed files with 50 additions and 94 deletions

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% if post.header.teaser %} {% if post.header.teaser %}
{% capture teaser %}{{ post.header.teaser }}{% endcapture %} {% capture teaser %}{{ post.header.teaser }}{% endcapture %}
{% else %} {% else %}
@ -20,16 +18,16 @@
{% if teaser contains "://" %} {% if teaser contains "://" %}
"{{ teaser }}" "{{ teaser }}"
{% else %} {% else %}
"{{ teaser | prepend: "/" | prepend: base_path }}" "{{ teaser | prepend: "/" | absolute_url }}"
{% endif %} {% endif %}
alt=""> alt="">
</div> </div>
{% endif %} {% endif %}
<h2 class="archive__item-title" itemprop="headline"> <h2 class="archive__item-title" itemprop="headline">
{% if post.link %} {% if post.link %}
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ base_path }}{{ post.url }}" rel="permalink"><i class="fa fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a> <a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | absolute_url }}" rel="permalink"><i class="fa fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
{% else %} {% else %}
<a href="{{ base_path }}{{ post.url }}" rel="permalink">{{ title }}</a> <a href="{{ post.url | absolute_url }}" rel="permalink">{{ title }}</a>
{% endif %} {% endif %}
</h2> </h2>
{% if post.read_time %} {% if post.read_time %}

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% if page.author and site.data.authors[page.author] %} {% if page.author and site.data.authors[page.author] %}
{% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.author %} {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.author %}
{% endif %} {% endif %}
@ -10,7 +8,7 @@
{% if author.avatar contains "://" %} {% if author.avatar contains "://" %}
<img src="{{ author.avatar }}" alt="{{ author.name }}"> <img src="{{ author.avatar }}" alt="{{ author.name }}">
{% else %} {% else %}
<img src="{{ author.avatar | prepend: "/" | prepend: base_path }}" class="author__avatar" alt="{{ author.name }}"> <img src="{{ author.avatar | prepend: "/" | absolute_url }}" class="author__avatar" alt="{{ author.name }}">
{% endif %} {% endif %}
</div> </div>

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% case site.categories.type %} {% case site.categories.type %}
{% when "liquid" %} {% when "liquid" %}
{% assign path_type = "#" %} {% assign path_type = "#" %}
@ -21,7 +19,7 @@
{% for crumb in crumbs offset: 1 %} {% for crumb in crumbs offset: 1 %}
{% if forloop.first %} {% if forloop.first %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="{{ base_path }}/" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a> <a href="{{ site.url }}{{ site.baseurl }}/" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
<meta itemprop="position" content="{{ i }}" /> <meta itemprop="position" content="{{ i }}" />
</li> </li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span> <span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
@ -31,7 +29,7 @@
{% else %} {% else %}
{% assign i = i | plus: 1 %} {% assign i = i | plus: 1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="{{ base_path }}{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a> <a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | absolute_url }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
<meta itemprop="position" content="{{ i }}" /> <meta itemprop="position" content="{{ i }}" />
</li> </li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span> <span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% case site.category_archive.type %} {% case site.category_archive.type %}
{% when "liquid" %} {% when "liquid" %}
{% assign path_type = "#" %} {% assign path_type = "#" %}
@ -21,7 +19,7 @@
{% for hash in category_hashes %} {% for hash in category_hashes %}
{% assign keyValue = hash | split: '#' %} {% assign keyValue = hash | split: '#' %}
{% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} {% capture category_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
<a href="{{ base_path }}{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %} <a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | absolute_url }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
{% endfor %} {% endfor %}
</span> </span>
</p> </p>

View file

@ -1,5 +1,3 @@
{% include base_path %}
<div class="page__comments"> <div class="page__comments">
{% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %} {% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %}
{% case site.comments.provider %} {% case site.comments.provider %}
@ -8,10 +6,10 @@
<section id="disqus_thread"></section> <section id="disqus_thread"></section>
{% when "facebook" %} {% when "facebook" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="fb-comments" data-href="{{ base_path }}{{ page.url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section> <section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
{% when "google-plus" %} {% when "google-plus" %}
<h4 class="page__comments-title">{{ comments_label }}</h4> <h4 class="page__comments-title">{{ comments_label }}</h4>
<section class="g-comments" data-href="{{ base_path }}{{ page.url }}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</section> <section class="g-comments" data-href="{{ page.url | absolute_url }}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</section>
{% when "staticman" %} {% when "staticman" %}
<section id="comments"> <section id="comments">
{% if site.repository and site.staticman.branch %} {% if site.repository and site.staticman.branch %}

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% if include.id %} {% if include.id %}
{% assign feature_row = page.[include.id] %} {% assign feature_row = page.[include.id] %}
{% else %} {% else %}
@ -13,7 +11,7 @@
{% if f.url contains "://" %} {% if f.url contains "://" %}
{% capture f_url %}{{ f.url }}{% endcapture %} {% capture f_url %}{{ f.url }}{% endcapture %}
{% else %} {% else %}
{% capture f_url %}{{ f.url | prepend: "/" | prepend: base_path }}{% endcapture %} {% capture f_url %}{{ f.url | prepend: "/" | absolute_url }}{% endcapture %}
{% endif %} {% endif %}
<div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}"> <div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">
@ -24,7 +22,7 @@
{% if f.image_path contains "://" %} {% if f.image_path contains "://" %}
"{{ f.image_path }}" "{{ f.image_path }}"
{% else %} {% else %}
"{{ f.image_path | prepend: "/" | prepend: base_path }}" "{{ f.image_path | prepend: "/" | absolute_url }}"
{% endif %} {% endif %}
alt="{% if f.alt %}{{ f.alt }}{% endif %}"> alt="{% if f.alt %}{{ f.alt }}{% endif %}">
</div> </div>

View file

@ -1,5 +1,3 @@
{% include base_path %}
<div class="page__footer-follow"> <div class="page__footer-follow">
<ul class="social-icons"> <ul class="social-icons">
{% if site.data.ui-text[site.locale].follow_label %} {% if site.data.ui-text[site.locale].follow_label %}
@ -17,7 +15,7 @@
{% if site.author.bitbucket %} {% if site.author.bitbucket %}
<li><a href="http://bitbucket.org/{{ site.author.bitbucket }}"><i class="fa fa-fw fa-bitbucket" aria-hidden="true"></i> Bitbucket</a></li> <li><a href="http://bitbucket.org/{{ site.author.bitbucket }}"><i class="fa fa-fw fa-bitbucket" aria-hidden="true"></i> Bitbucket</a></li>
{% endif %} {% endif %}
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ base_path }}/feed.xml{% endif %}"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li> <li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | absolute_url }}{% endif %}"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
</ul> </ul>
</div> </div>

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% if include.id %} {% if include.id %}
{% assign gallery = page.[include.id] %} {% assign gallery = page.[include.id] %}
{% else %} {% else %}
@ -21,7 +19,7 @@
{% if img.url contains "://" %} {% if img.url contains "://" %}
"{{ img.url }}" "{{ img.url }}"
{% else %} {% else %}
"{{ img.url | prepend: "/" | prepend: base_path }}" "{{ img.url | prepend: "/" | absolute_url }}"
{% endif %} {% endif %}
{% if img.title %}title="{{ img.title }}"{% endif %} {% if img.title %}title="{{ img.title }}"{% endif %}
> >
@ -29,7 +27,7 @@
{% if img.image_path contains "://" %} {% if img.image_path contains "://" %}
"{{ img.image_path }}" "{{ img.image_path }}"
{% else %} {% else %}
"{{ img.image_path | prepend: "/" | prepend: base_path }}" "{{ img.image_path | prepend: "/" | absolute_url }}"
{% endif %} {% endif %}
alt="{% if img.alt %}{{ img.alt }}{% endif %}"> alt="{% if img.alt %}{{ img.alt }}{% endif %}">
</a> </a>
@ -38,7 +36,7 @@
{% if img.image_path contains "://" %} {% if img.image_path contains "://" %}
"{{ img.image_path }}" "{{ img.image_path }}"
{% else %} {% else %}
"{{ img.image_path | prepend: "/" | prepend: base_path }}" "{{ img.image_path | prepend: "/" | absolute_url }}"
{% endif %} {% endif %}
alt="{% if img.alt %}{{ img.alt }}{% endif %}"> alt="{% if img.alt %}{{ img.alt }}{% endif %}">
{% endif %} {% endif %}

View file

@ -1,10 +1,8 @@
{% include base_path %}
<meta charset="utf-8"> <meta charset="utf-8">
{% include seo.html %} {% include seo.html %}
<link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ base_path }}/feed.xml{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed"> <link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | absolute_url }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
<!-- http://t.co/dKP3o1e --> <!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True"> <meta name="HandheldFriendly" content="True">
@ -16,6 +14,6 @@
</script> </script>
<!-- For all browsers --> <!-- For all browsers -->
<link rel="stylesheet" href="{{ base_path }}/assets/css/main.css"> <link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}">
<meta http-equiv="cleartype" content="on"> <meta http-equiv="cleartype" content="on">

View file

@ -1,17 +1,15 @@
{% include base_path %}
<div class="masthead"> <div class="masthead">
<div class="masthead__inner-wrap"> <div class="masthead__inner-wrap">
<div class="masthead__menu"> <div class="masthead__menu">
<nav id="site-nav" class="greedy-nav"> <nav id="site-nav" class="greedy-nav">
<button><div class="navicon"></div></button> <button><div class="navicon"></div></button>
<ul class="visible-links"> <ul class="visible-links">
<li class="masthead__menu-item masthead__menu-item--lg"><a href="{{ base_path }}/">{{ site.title }}</a></li> <li class="masthead__menu-item masthead__menu-item--lg"><a href="{{ '/' | absolute_url }}">{{ site.title }}</a></li>
{% for link in site.data.navigation.main %} {% for link in site.data.navigation.main %}
{% if link.url contains 'http' %} {% if link.url contains 'http' %}
{% assign domain = '' %} {% assign domain = '' %}
{% else %} {% else %}
{% assign domain = base_path %} {% assign domain = site.url | append: site.baseurl %}
{% endif %} {% endif %}
<li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}">{{ link.title }}</a></li> <li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}">{{ link.title }}</a></li>
{% endfor %} {% endfor %}

View file

@ -1,4 +1,3 @@
{% include base_path %}
{% assign navigation = site.data.navigation[include.nav] %} {% assign navigation = site.data.navigation[include.nav] %}
<nav class="nav__list"> <nav class="nav__list">
@ -7,11 +6,11 @@
{% for nav in navigation %} {% for nav in navigation %}
<li> <li>
{% if nav.url %} {% if nav.url %}
{% comment %}internal/external URL check{% endcomment %} {% comment %} internal/external URL check {% endcomment %}
{% if nav.url contains "://" %} {% if nav.url contains "://" %}
{% assign domain = "" %} {% assign domain = "" %}
{% else %} {% else %}
{% assign domain = base_path %} {% assign domain = site.url | append: site.baseurl %}
{% endif %} {% endif %}
<a href="{{ domain }}{{ nav.url }}"><span class="nav__sub-title">{{ nav.title }}</span></a> <a href="{{ domain }}{{ nav.url }}"><span class="nav__sub-title">{{ nav.title }}</span></a>
@ -22,14 +21,14 @@
{% if nav.children != null %} {% if nav.children != null %}
<ul> <ul>
{% for child in nav.children %} {% for child in nav.children %}
{% comment %}internal/external URL check{% endcomment %} {% comment %} internal/external URL check {% endcomment %}
{% if child.url contains "://" %} {% if child.url contains "://" %}
{% assign domain = "" %} {% assign domain = "" %}
{% else %} {% else %}
{% assign domain = base_path %} {% assign domain = site.url | append: site.baseurl %}
{% endif %} {% endif %}
{% comment %}set "active" class on current page{% endcomment %} {% comment %} set "active" class on current page {% endcomment %}
{% if child.url == page.url %} {% if child.url == page.url %}
{% assign active = "active" %} {% assign active = "active" %}
{% else %} {% else %}

View file

@ -1,21 +1,19 @@
{% include base_path %}
{% if page.header.image contains "://" %} {% if page.header.image contains "://" %}
{% capture img_path %}{{ page.header.image }}{% endcapture %} {% capture img_path %}{{ page.header.image }}{% endcapture %}
{% else %} {% else %}
{% capture img_path %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endcapture %} {% capture img_path %}{{ page.header.image | prepend: "/" | absolute_url }}{% endcapture %}
{% endif %} {% endif %}
{% if page.header.cta_url contains "://" %} {% if page.header.cta_url contains "://" %}
{% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %}
{% else %} {% else %}
{% capture cta_path %}{{ page.header.cta_url | prepend: base_path }}{% endcapture %} {% capture cta_path %}{{ page.header.cta_url | absolute_url }}{% endcapture %}
{% endif %} {% endif %}
{% if page.header.overlay_image contains "://" %} {% if page.header.overlay_image contains "://" %}
{% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %}
{% elsif page.header.overlay_image %} {% elsif page.header.overlay_image %}
{% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/" | prepend: base_path }}{% endcapture %} {% capture overlay_img_path %}{{ page.header.overlay_image | prepend: "/" | absolute_url }}{% endcapture %}
{% endif %} {% endif %}
{% if page.header.overlay_filter contains "rgba" %} {% if page.header.overlay_filter contains "rgba" %}

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% if site.tag_archive.type and page.tags[0] %} {% if site.tag_archive.type and page.tags[0] %}
{% include tag-list.html %} {% include tag-list.html %}
{% endif %} {% endif %}

View file

@ -1,14 +1,12 @@
{% include base_path %}
{% if paginator.total_pages > 1 %} {% if paginator.total_pages > 1 %}
<nav class="pagination"> <nav class="pagination">
<ul> <ul>
{% comment %} Link for previous page {% endcomment %} {% comment %} Link for previous page {% endcomment %}
{% if paginator.previous_page %} {% if paginator.previous_page %}
{% if paginator.previous_page == 1 %} {% if paginator.previous_page == 1 %}
<li><a href="{{ base_path }}/">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li> <li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
{% else %} {% else %}
<li><a href="{{ base_path }}/page{{ paginator.previous_page }}/">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li> <li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
{% endif %} {% endif %}
{% else %} {% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li> <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
@ -18,7 +16,7 @@
{% if paginator.page == 1 %} {% if paginator.page == 1 %}
<li><a href="#" class="disabled current">1</a></li> <li><a href="#" class="disabled current">1</a></li>
{% else %} {% else %}
<li><a href="{{ base_path }}/">1</a></li> <li><a href="{{ '/' | absolute_url }}">1</a></li>
{% endif %} {% endif %}
{% assign page_start = 2 %} {% assign page_start = 2 %}
@ -36,7 +34,7 @@
{% for index in (page_start..page_end) %} {% for index in (page_start..page_end) %}
{% if index == paginator.page %} {% if index == paginator.page %}
<li><a href="{{ base_path }}/page{{ index }}/" class="disabled current">{{ index }}</a></li> <li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
{% else %} {% else %}
{% comment %} Distance from current page and this link {% endcomment %} {% comment %} Distance from current page and this link {% endcomment %}
{% assign dist = paginator.page | minus: index %} {% assign dist = paginator.page | minus: index %}
@ -44,7 +42,7 @@
{% comment %} Distance must be a positive value {% endcomment %} {% comment %} Distance must be a positive value {% endcomment %}
{% assign dist = 0 | minus: dist %} {% assign dist = 0 | minus: dist %}
{% endif %} {% endif %}
<li><a href="{{ base_path }}/page{{ index }}/">{{ index }}</a></li> <li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View file

@ -1,14 +1,12 @@
{% include base_path %}
{% if page.previous or page.next %} {% if page.previous or page.next %}
<nav class="pagination"> <nav class="pagination">
{% if page.previous %} {% if page.previous %}
<a href="{{ base_path }}{{ page.previous.url }}" class="pagination--pager" title="{{ page.previous.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a> <a href="{{ page.previous.url | absolute_url }}" class="pagination--pager" title="{{ page.previous.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a>
{% else %} {% else %}
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a> <a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a>
{% endif %} {% endif %}
{% if page.next %} {% if page.next %}
<a href="{{ base_path }}{{ page.next.url }}" class="pagination--pager" title="{{ page.next.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a> <a href="{{ page.next.url | absolute_url }}" class="pagination--pager" title="{{ page.next.title | markdownify | strip_html }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a>
{% else %} {% else %}
<a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a> <a href="#" class="pagination--pager disabled">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a>
{% endif %} {% endif %}

View file

@ -1,4 +1,4 @@
<script src="{{ base_path }}/assets/js/main.min.js"></script> <script src="{{ '/assets/js/main.min.js' | absolute_url }}"></script>
{% include analytics.html %} {% include analytics.html %}
{% include /comments-providers/scripts.html %} {% include /comments-providers/scripts.html %}

View file

@ -1,5 +1,3 @@
{% include base_path %}
<!-- begin SEO --> <!-- begin SEO -->
{% if site.url %} {% if site.url %}
{% assign seo_url = site.url | append: site.baseurl %} {% assign seo_url = site.url | append: site.baseurl %}
@ -60,13 +58,13 @@
{% if page.header.image %} {% if page.header.image %}
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endif %}"> <meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | absolute_url }}{% endif %}">
{% else %} {% else %}
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
{% if page.header.teaser %} {% if page.header.teaser %}
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | prepend: base_path }}{% endif %}"> <meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | absolute_url }}{% endif %}">
{% elsif site.og_image %} {% elsif site.og_image %}
<meta name="twitter:image" content="{{ site.og_image | prepend: "/" | prepend: base_path }}"> <meta name="twitter:image" content="{{ site.og_image | prepend: "/" | absolute_url }}">
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -86,13 +84,13 @@
{% endif %} {% endif %}
{% if page.header.image %} {% if page.header.image %}
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | prepend: base_path }}{% endif %}"> <meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | prepend: "/" | absolute_url }}{% endif %}">
{% elsif page.header.overlay_image %} {% elsif page.header.overlay_image %}
<meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/" | prepend: base_path }}{% endif %}"> <meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | prepend: "/" | absolute_url }}{% endif %}">
{% elsif page.header.teaser %} {% elsif page.header.teaser %}
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | prepend: base_path }}{% endif %}"> <meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | prepend: "/" | absolute_url }}{% endif %}">
{% elsif site.og_image %} {% elsif site.og_image %}
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/" | prepend: base_path }}{% endif %}"> <meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | prepend: "/" | absolute_url }}{% endif %}">
{% endif %} {% endif %}
{% if page.date %} {% if page.date %}
@ -113,7 +111,7 @@
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "Organization", "@type": "Organization",
"url": {{ seo_url | jsonify }}, "url": {{ seo_url | jsonify }},
"logo": {{ site.og_image | prepend: "/" | prepend: base_path | jsonify }} "logo": {{ site.og_image | prepend: "/" | absolute_url | jsonify }}
} }
</script> </script>
{% endif %} {% endif %}

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% if page.author_profile or layout.author_profile or page.sidebar %} {% if page.author_profile or layout.author_profile or page.sidebar %}
<div class="sidebar sticky"> <div class="sidebar sticky">
{% if page.author_profile or layout.author_profile %}{% include author-profile.html %}{% endif %} {% if page.author_profile or layout.author_profile %}{% include author-profile.html %}{% endif %}
@ -10,7 +8,7 @@
{% if s.image contains "://" %} {% if s.image contains "://" %}
"{{ s.image }}" "{{ s.image }}"
{% else %} {% else %}
"{{ s.image | prepend: "/" | prepend: base_path }}" "{{ s.image | prepend: "/" | absolute_url }}"
{% endif %} {% endif %}
alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}"> alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}">
{% endif %} {% endif %}

View file

@ -1,15 +1,13 @@
{% include base_path %}
<section class="page__share"> <section class="page__share">
{% if site.data.ui-text[site.locale].share_on_label %} {% if site.data.ui-text[site.locale].share_on_label %}
<h4 class="page__share-title">{{ site.data.ui-text[site.locale].share_on_label | default: "Share on" }}</h4> <h4 class="page__share-title">{{ site.data.ui-text[site.locale].share_on_label | default: "Share on" }}</h4>
{% endif %} {% endif %}
<a href="https://twitter.com/intent/tweet?{% if site.twitter.username %}via={{ site.twitter.username }}&{% endif %}text={{ page.title }} {{ base_path }}{{ page.url }}" class="btn btn--twitter" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a> <a href="https://twitter.com/intent/tweet?{% if site.twitter.username %}via={{ site.twitter.username }}&{% endif %}text={{ page.title }} {{ page.url | absolute_url }}" class="btn btn--twitter" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ base_path }}{{ page.url }}" class="btn btn--facebook" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a> <a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url }}" class="btn btn--facebook" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
<a href="https://plus.google.com/share?url={{ base_path }}{{ page.url }}" class="btn btn--google-plus" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a> <a href="https://plus.google.com/share?url={{ page.url | absolute_url }}" class="btn btn--google-plus" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ base_path }}{{ page.url }}" class="btn btn--linkedin" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a> <a href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url }}" class="btn btn--linkedin" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
</section> </section>

View file

@ -1,5 +1,3 @@
{% include base_path %}
{% case site.tag_archive.type %} {% case site.tag_archive.type %}
{% when "liquid" %} {% when "liquid" %}
{% assign path_type = "#" %} {% assign path_type = "#" %}
@ -21,7 +19,7 @@
{% for hash in tag_hashes %} {% for hash in tag_hashes %}
{% assign keyValue = hash | split: '#' %} {% assign keyValue = hash | split: '#' %}
{% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %} {% capture tag_word %}{{ keyValue[1] | strip_newlines }}{% endcapture %}
<a href="{{ base_path }}{{ tag_word | slugify | prepend: path_type | prepend: site.tag_archive.path }}" class="page__taxonomy-item" rel="tag">{{ tag_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %} <a href="{{ tag_word | slugify | prepend: path_type | prepend: site.tag_archive.path | absolute_url }}" class="page__taxonomy-item" rel="tag">{{ tag_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
{% endfor %} {% endfor %}
</span> </span>
</p> </p>

View file

@ -8,7 +8,6 @@ author_profile: false
<div class="archive"> <div class="archive">
<h1 class="page__title">{{ page.title }}</h1> <h1 class="page__title">{{ page.title }}</h1>
{% include base_path %}
{% for post in page.posts %} {% for post in page.posts %}
{% include archive-single.html %} {% include archive-single.html %}
{% endfor %} {% endfor %}

View file

@ -1,8 +1,6 @@
--- ---
--- ---
{% include base_path %}
<!doctype html> <!doctype html>
<html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js"> <html lang="{{ site.locale | slice: 0,2 | default: "en" }}" class="no-js">
<head> <head>

View file

@ -2,8 +2,6 @@
layout: default layout: default
--- ---
{% include base_path %}
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} {% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% include page__hero.html %} {% include page__hero.html %}
{% endif %} {% endif %}

View file

@ -2,8 +2,6 @@
layout: default layout: default
--- ---
{% include base_path %}
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %} {% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% include page__hero.html %} {% include page__hero.html %}
{% endif %} {% endif %}