Add support for baseurl
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %}
|
||||
|
||||
<!doctype html>
|
||||
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
||||
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
|
||||
@@ -19,7 +21,7 @@
|
||||
{% if page.image.feature contains 'http' %}
|
||||
"{{ page.image.feature }}"
|
||||
{% else %}
|
||||
"{{ site.url }}/images/{{ page.image.feature }}"
|
||||
"{{ page.image.feature | prepend: "/images/" | prepend: absurl }}"
|
||||
{% endif %}
|
||||
alt="{{ page.title }} feature image">
|
||||
{% if page.image.credit %}
|
||||
@@ -33,13 +35,13 @@
|
||||
{% include author-bio.html %}
|
||||
</div>
|
||||
<div id="index">
|
||||
<h3><a href="{{ site.url}}/posts/">Recent Posts</a></h3>
|
||||
<h3><a href="{{ absurl }}/posts/">Recent Posts</a></h3>
|
||||
{% for post in site.posts limit:5 %}
|
||||
<article>
|
||||
{% if post.link %}
|
||||
<h2 class="link-post"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></a></h2>
|
||||
<h2 class="link-post"><a href="{{ absurl }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title }}"><i class="fa fa-link"></i></a></h2>
|
||||
{% else %}
|
||||
<h2><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
|
||||
<h2><a href="{{ absurl }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
|
||||
<p>{{ post.excerpt | strip_html | truncate: 160 }}</p>
|
||||
{% endif %}
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user