Commit efebd00e authored by Kenton Varda's avatar Kenton Varda

Fix issues with github hosting the page out of a subdirectory.

parent 211bdd9d
safe: true safe: true
permalink: /news/:year-:month-:day-:title.html permalink: /news/:year-:month-:day-:title.html
baseurl: /capnproto/
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<meta name="description" content="Capnproto : Cap'n Proto serialization/RPC system" /> <meta name="description" content="Capnproto : Cap'n Proto serialization/RPC system" />
<meta name="viewport" content="width=480"> <meta name="viewport" content="width=480">
<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/stylesheet.css"> <link rel="stylesheet" type="text/css" media="screen" href="{{ site.baseurl }}stylesheets/stylesheet.css">
<title>Cap'n Proto</title> <title>Cap'n Proto</title>
<script type="text/javascript" src="/javascripts/main.js"></script> <script type="text/javascript" src="{{ site.baseurl }}javascripts/main.js"></script>
</head> </head>
<body class="desktop"> <body class="desktop">
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<!-- HEADER --> <!-- HEADER -->
<div id="header_wrap" class="outer"> <div id="header_wrap" class="outer">
<header class="inner"> <header class="inner">
<img src="/images/captain_proto.png"> <img src="{{ site.baseurl }}images/captain_proto.png">
<div id="infinitely_faster"> <div id="infinitely_faster">
<img src="/images/infinitely_faster.png"> <img src="{{ site.baseurl }}images/infinitely_faster.png">
</div> </div>
</header> </header>
<a id="discuss_banner" href="https://groups.google.com/group/capnproto">Discuss on Groups</a> <a id="discuss_banner" href="https://groups.google.com/group/capnproto">Discuss on Groups</a>
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
<section id="menu"> <section id="menu">
<ul> <ul>
<li><a href="/index.html">Introduction</a></li> <li><a href="{{ site.baseurl }}index.html">Introduction</a></li>
<li><a href="/news/">News</a></li> <li><a href="{{ site.baseurl }}news/">News</a></li>
<li><a href="/install.html">Installation</a></li> <li><a href="{{ site.baseurl }}install.html">Installation</a></li>
<li><a href="/language.html">Schema Language</a></li> <li><a href="{{ site.baseurl }}language.html">Schema Language</a></li>
<li><a href="/encoding.html">Encoding</a></li> <li><a href="{{ site.baseurl }}encoding.html">Encoding</a></li>
<li><a href="/rpc.html">RPC Protocol</a></li> <li><a href="{{ site.baseurl }}rpc.html">RPC Protocol</a></li>
<li><a href="/cxx.html">C++ Runtime</a></li> <li><a href="{{ site.baseurl }}cxx.html">C++ Runtime</a></li>
<li><a href="/otherlang.html">Other Languages</a></li> <li><a href="{{ site.baseurl }}otherlang.html">Other Languages</a></li>
</ul> </ul>
</section> </section>
<section id="main_content" class="inner"> <section id="main_content" class="inner">
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="hmargin" style="float: right"><a class="groups_link" style="color: #fff" <div class="hmargin" style="float: right"><a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div> href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div>
<h1><a href="/news/">News</a></h1> <h1><a href="{{ site.baseurl }}news/">News</a></h1>
<h2>{{ page.title }}</h2> <h2>{{ page.title }}</h2>
<p class="author"> <p class="author">
...@@ -13,7 +13,7 @@ href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div> ...@@ -13,7 +13,7 @@ href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div>
{{ content }} {{ content }}
<script type="text/javascript">setupNewsSidebar([ <script type="text/javascript">setupNewsSidebar([
{% for post in site.posts %} {% for post in site.posts %}
{ title: "{{ post.title }}", url: "{{ post.url }}" }, { title: "{{ post.title }}", url: "/capnproto{{ post.url }}" },
{% endfor %} {% endfor %}
]);</script> ]);</script>
{% include footer.html %} {% include footer.html %}
...@@ -4,7 +4,7 @@ title: Announcing Cap'n Proto ...@@ -4,7 +4,7 @@ title: Announcing Cap'n Proto
author: kentonv author: kentonv
--- ---
<img src='/images/infinity-times-faster.png' style='width:334px; height:306px; float: right;'> <img src='{{ site.baseurl }}images/infinity-times-faster.png' style='width:334px; height:306px; float: right;'>
So, uh... I have a confession to make. So, uh... I have a confession to make.
......
function initSidebar() { function initSidebar() {
var filename = document.location.pathname; var filename = document.location.pathname.slice("/capnproto".length);
if (filename == "/") { if (filename == "/") {
filename = "/index.html"; filename = "/index.html";
...@@ -45,7 +45,7 @@ function initSidebar() { ...@@ -45,7 +45,7 @@ function initSidebar() {
window.location.href = url; window.location.href = url;
event.stopPropagation(); event.stopPropagation();
} }
})(href + "#main_content"); })(href + "#");
parent.appendChild(p); parent.appendChild(p);
items[i].className = "selected"; items[i].className = "selected";
toc = document.createElement("ul"); toc = document.createElement("ul");
......
...@@ -9,7 +9,7 @@ href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div> ...@@ -9,7 +9,7 @@ href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div>
<h1>News</h1> <h1>News</h1>
{% for post in site.posts %} {% for post in site.posts %}
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2> <h2><a href="/capnproto{{ post.url }}">{{ post.title }}</a></h2>
<p class="author"> <p class="author">
<a href="https://github.com/{{ post.author }}">{{ post.author }}</a> <a href="https://github.com/{{ post.author }}">{{ post.author }}</a>
on <span class="date">{{ post.date | date_to_string }}</span> on <span class="date">{{ post.date | date_to_string }}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment