diff options
| author | Veikka Kähkönen <insiding@gmail.com> | 2017-08-29 23:05:32 +0300 |
|---|---|---|
| committer | Veikka Kähkönen <insiding@gmail.com> | 2017-08-29 23:05:32 +0300 |
| commit | 8ab0c5c9e0afa98b9af0a407c10685e2d4bbfa7e (patch) | |
| tree | acade8a92d0fdd835ca5d5cf79cf734cd3cf564c | |
| parent | a98618d5b0bd0d99fe3a474586d84ee2d08981fa (diff) | |
Add baseurl support
| -rw-r--r-- | _config.yml | 1 | ||||
| -rw-r--r-- | _includes/footer.html | 6 | ||||
| -rw-r--r-- | _includes/head.html | 8 | ||||
| -rw-r--r-- | _includes/header.html | 4 | ||||
| -rw-r--r-- | _layouts/default.html | 2 |
5 files changed, 12 insertions, 9 deletions
diff --git a/_config.yml b/_config.yml index d9a992f..568224a 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,7 @@ email: hallitus@as.fi description: > # this means to ignore newlines until "baseurl:" hilipatipimppa url: "http://as.fi" # the base hostname & protocol for your site +baseurl: '' # Build settings markdown: kramdown diff --git a/_includes/footer.html b/_includes/footer.html index 35eed2f..f3b6822 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"> <div class="footer-col footer-col-1"> - <a href="http://new.abb.com/fi"><img width="100" style="margin:20px;border:0;" src="{{ site.url }}/static/sponsors/ABB.png" alt=""></a> - <a href="http://reaktor.com/"><img width="150" style="margin:20px;border:0;" src="{{ site.url }}/static/sponsors/reaktor.png" alt=""></a> - <a href="http://www.eficode.fi/"><img width="100" style="margin:20px;border:0;" src="{{ site.url }}/static/sponsors/eficode.png" alt=""></a> + <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> </div> </div> diff --git a/_includes/head.html b/_includes/head.html index f62ab63..2fdb64b 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -4,8 +4,8 @@ <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="/favicon.png" /> - <link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}"> - <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}"> - <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}"> + <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"> </head> diff --git a/_includes/header.html b/_includes/header.html index 2c18219..0a5cdbd 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -18,7 +18,7 @@ {% assign current_page = false %} {% endif %} <li class="navigation__item {% if current_page %}active{% endif %}"> - <a href="{{ site.url }}{{ item.href }}">{{ item.title }}</a> + <a href="{{ site_full_url }}{{ item.href }}">{{ 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.url }}{{ main_page_href }}{{ subitem.href }}">{{ subitem.title }}</a> + <a href="{{ site_full_url }}{{ main_page_href }}{{ subitem.href }}">{{ subitem.title }}</a> </li> {% endfor %} </ul> diff --git a/_layouts/default.html b/_layouts/default.html index e4ab96f..9081473 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,6 +1,8 @@ <!DOCTYPE html> <html> + {% assign site_full_url = site.url | append: site.baseurl %} + {% include head.html %} <body> |
