1
Fork 0

Prepend baseurl everywhere.

This allows for easy re-deployment in sub folders
This commit is contained in:
Jan-Erik Rediger 2014-09-19 11:14:39 +02:00
parent 516ab78579
commit 27c7600eff
6 changed files with 20 additions and 20 deletions

View file

@ -1,6 +1,6 @@
<div class="post"> <div class="post">
<h2 class="heading"> <h2 class="heading">
<a href="{{post.url}}">{{post.title}}</a> <a href="{{site.baseurl}}{{post.url | replace_first: '/'}}">{{post.title}}</a>
</h2> </h2>
{% if post.date %} {% if post.date %}
<p class="date"> <p class="date">

View file

@ -3,8 +3,8 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>fnordig.de</title> <title>fnordig.de</title>
<link rel="stylesheet" href="/fnord.css" type="text/css" /> <link rel="stylesheet" href="{{site.baseurl}}fnord.css" type="text/css" />
<link rel="stylesheet" href="/coderay.css" type="text/css" /> <link rel="stylesheet" href="{{site.baseurl}}coderay.css" type="text/css" />
<!--[if !IE]>--> <!--[if !IE]>-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<script type="text/javascript"> <script type="text/javascript">
@ -16,12 +16,12 @@
<div class="content"> <div class="content">
<div class="nav"> <div class="nav">
<h1> <h1>
<a href="/">fnordig</a> <a href="{{site.baseurl}}">fnordig</a>
</h1> </h1>
<ul> <ul>
<li><a href="/posts/">posts</a></li> <li><a href="{{site.baseurl}}posts/">posts</a></li>
<li><a href="/about/">about</a></li> <li><a href="{{site.baseurl}}about/">about</a></li>
<li><a href="/feed.xml">feed</a></li> <li><a href="{{site.baseurl}}feed.xml">feed</a></li>
<li>| links:</li> <li>| links:</li>
<li><a href="https://twitter.com/badboy_">@badboy_</a> /</li> <li><a href="https://twitter.com/badboy_">@badboy_</a> /</li>
<li><a href="https://github.com/badboy">github</a></li> <li><a href="https://github.com/badboy">github</a></li>
@ -34,8 +34,8 @@
<p>// <p>//
&nbsp;&nbsp;jan-erik / &nbsp;&nbsp;jan-erik /
<a href="http://twitter.com/badboy_">@badboy_</a> / <a href="http://twitter.com/badboy_">@badboy_</a> /
<a href="/imprint/">imprint</a> / <a href="{{site.baseurl}}imprint/">imprint</a> /
<a href="/feed.xml">feed</a> <a href="{{site.baseurl}}feed.xml">feed</a>
</p> </p>
</div> </div>
</div> </div>

View file

@ -3,7 +3,7 @@ layout: default
--- ---
<div class="post"> <div class="post">
<h2 class="heading"> <h2 class="heading">
<a href="{{page.url}}">{{page.title}}</a> <a href="{{site.baseurl}}{{page.url | replace_first: '/'}}">{{page.title}}</a>
</h2> </h2>
{% if page.date %} {% if page.date %}
<p class="date"> <p class="date">

View file

@ -19,7 +19,7 @@ layout: nil
<title>{{ post.title }}</title> <title>{{ post.title }}</title>
<link href="http://fnordig.de{{ post.url }}"/> <link href="http://fnordig.de{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated> <updated>{{ post.date | date_to_xmlschema }}</updated>
<id>http://fnordig.de{{ post.url }}</id> <id>http://fnordig.de{{site.baseurl}}{{ post.url | replace_first: '/'}}</id>
<content type="html">{{ post.content | xml_escape }}</content> <content type="html">{{ post.content | xml_escape }}</content>
</entry> </entry>
{% endfor %} {% endfor %}

View file

@ -10,9 +10,9 @@ title: fnordig.de
<div class="paginator"> <div class="paginator">
{% if paginator.previous_page %} {% if paginator.previous_page %}
{% if paginator.previous_page == 1 %} {% if paginator.previous_page == 1 %}
<a class="prev" href="/">« Previous page</a> <a class="prev" href="{{site.baseurl}}">« Previous page</a>
{% else %} {% else %}
<a class="prev" href="/page{{paginator.previous_page}}">« Previous page</a> <a class="prev" href="{{site.baseurl}}page{{paginator.previous_page}}">« Previous page</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -21,6 +21,6 @@ title: fnordig.de
{% endif %} {% endif %}
{% if paginator.next_page %} {% if paginator.next_page %}
<a class="next" href="/page{{paginator.next_page}}">Next page »</a> <a class="next" href="{{site.baseurl}}page{{paginator.next_page}}">Next page »</a>
{% endif %} {% endif %}
</div> </div>

View file

@ -4,5 +4,5 @@ title: posts
--- ---
{% for post in site.posts %} {% for post in site.posts %}
* {{post.date | date_to_string}}: [{{post.title}}]({{post.url}}) * {{post.date | date_to_string}}: [{{post.title}}]({{post.url | remove_first: '/' | prepend: site.baseurl}})
{% endfor %} {% endfor %}