aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeikka Kähkönen <insiding@gmail.com>2017-11-27 23:09:06 +0200
committerVeikka Kähkönen <insiding@gmail.com>2017-11-27 23:09:06 +0200
commit6fb186d18008e24e97212c27a3f60138965aa33e (patch)
tree66060c55c4e85719ec62f846ff027383bbba288d
parentdf4d2a345886f0114684358a91c9b4ba2fc8cb73 (diff)
Use absolute_url filter instead of a custom variable for URLs
-rw-r--r--_includes/footer.html6
-rw-r--r--_includes/head.html8
-rw-r--r--_includes/header.html6
-rw-r--r--_layouts/default.html2
-rw-r--r--_layouts/hallitus.html2
-rw-r--r--_layouts/people_generic.html2
6 files changed, 12 insertions, 14 deletions
diff --git a/_includes/footer.html b/_includes/footer.html
index b45e1b9..48de696 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -5,9 +5,9 @@
<h2 class="footer-heading">Yhteistyössä</h2>
<div class="footer-col-wrapper">
- <a href="http://new.abb.com/fi"><img width="100" style="margin:20px;border:0;" src="{{ site_full_url }}/static/sponsors/ABB.png" alt=""></a>
- <a href="http://reaktor.com/"><img width="150" style="margin:20px;border:0;" src="{{ site_full_url }}/static/sponsors/reaktor.png" alt=""></a>
- <a href="http://www.eficode.fi/"><img width="100" style="margin:20px;border:0;" src="{{ site_full_url }}/static/sponsors/eficode.png" alt=""></a>
+ <a href="http://new.abb.com/fi"><img width="100" style="margin:20px;border:0;" src="{{ "/static/sponsors/ABB.png" | absolute_url }}" alt=""></a>
+ <a href="http://reaktor.com/"><img width="150" style="margin:20px;border:0;" src="{{ "/static/sponsors/reaktor.png" | absolute_url }}" alt=""></a>
+ <a href="http://www.eficode.fi/"><img width="100" style="margin:20px;border:0;" src="{{ "/static/sponsors/eficode.png" | absolute_url }}" alt=""></a>
</div>
diff --git a/_includes/head.html b/_includes/head.html
index 7db3027..b4e5c8e 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -4,9 +4,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
- <link rel="icon" type="image/png" href="{{ site_full_url }}/favicon.png" />
- <link rel="stylesheet" href="{{ site_full_url }}/css/main.css">
- <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site_full_url }}">
- <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ site_full_url }}/feed.xml">
+ <link rel="icon" type="image/png" href="{{ "/favicon.png" | absolute_url }}" />
+ <link rel="stylesheet" href="{{ "/css/main.css" | absolute_url }}">
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | absolute_url }}">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
diff --git a/_includes/header.html b/_includes/header.html
index 9c5ab06..7139c89 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -2,7 +2,7 @@
<div class="header__title">
<h1 style="margin-bottom: 0px !important;">
- <a class="site-title" href="{{ site.baseurl }}/"><img src="{{ site_full_url }}/static/aswhite.png"/ height="40px" style="margin:20px "><span class="mobile_hide">{{ site.title }}</span></a>
+ <a class="site-title" href="{{ "/" | absolute_url }}"><img src="{{ "/static/aswhite.png" | absolute_url }}" height="40px" style="margin:20px "><span class="mobile_hide">{{ site.title }}</span></a>
</h1>
</div>
<nav class="navigation header__navigation">
@@ -18,7 +18,7 @@
{% assign current_page = false %}
{% endif %}
<li class="navigation__item {% if current_page %}active{% endif %}">
- <a href="{{ site_full_url }}{{ item.href }}">{{ item.title }}</a>
+ <a href="{{ item.href | absolute_url }}">{{ item.title }}</a>
</li>
{% if current_page and item.subnavi %}
{% assign subnavi = item.subnavi %}
@@ -32,7 +32,7 @@
<ul>
{% for subitem in subnavi.items %}
<li class="navigation__item {% if subitem.href == subpage_href %}active{% endif %}">
- <a href="{{ site_full_url }}{{ main_page_href }}{{ subitem.href }}">{{ subitem.title }}</a>
+ <a href="{{ main_page_href | absolute_url }}{{ subitem.href }}">{{ subitem.title }}</a>
</li>
{% endfor %}
</ul>
diff --git a/_layouts/default.html b/_layouts/default.html
index 9081473..e4ab96f 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
- {% assign site_full_url = site.url | append: site.baseurl %}
-
{% include head.html %}
<body>
diff --git a/_layouts/hallitus.html b/_layouts/hallitus.html
index c355037..14a7263 100644
--- a/_layouts/hallitus.html
+++ b/_layouts/hallitus.html
@@ -16,7 +16,7 @@ layout: page
{% endif %}
<div class="contact col span_1_of_2">
<div class="contact-inline">
- <img class="contact__photo" style="max-height:200px; margin: 0 auto;" src="{{ site.url | append: site.baseurl }}/{{ person.picture }}" alt="">
+ <img class="contact__photo" style="max-height:200px; margin: 0 auto;" src="{{ person.picture | absolute_url }}" alt="">
<h3 class="contact__position_name contact__position_name--hallitus">{{ person.position_name }}</h3>
<h4 class="contact__person_name">{{ person.person_name }}</h4>
<div class="contact__section">
diff --git a/_layouts/people_generic.html b/_layouts/people_generic.html
index 108828a..28b73c1 100644
--- a/_layouts/people_generic.html
+++ b/_layouts/people_generic.html
@@ -25,7 +25,7 @@ layout: page
{% else %}
{% assign picture_path = page.placeholder_img %}
{% endif %}
- <img class="contact__photo" style="max-height:200px; margin: 0 auto;" src="{{ site.url | append: site.baseurl }}/{{ picture_path }}" alt="">
+ <img class="contact__photo" style="max-height:200px; margin: 0 auto;" src="{{ picture_path | absolute_url }}" alt="">
<h4 class="contact__person_name contact__person_name--generic">{{ member.name }}</h4>
{% if member.email %}
<div class="contact__section">