Skip to content

Commit

Permalink
Disable canonifyURLs and relativeURLs, adjust templates to match.
Browse files Browse the repository at this point in the history
This was breaking the 404 page in particular. With this change, links
will be relative to the HTTP root (no https://), which should work for
all pages when served from a web server.
  • Loading branch information
tohojo committed Jun 18, 2016
1 parent af82006 commit 133e4f6
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 25 deletions.
4 changes: 2 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ baseurl: "https://www.bufferbloat.net/projects/"
languageCode: "en-us"
title: "Bufferbloat.net"
disable404: false
canonifyURLs: true
relativeURLs: true
canonifyURLs: false
relativeURLs: false

pluralizeListTitles: false
metadataFormat: yaml
Expand Down
6 changes: 3 additions & 3 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h1>Bufferbloat</h1>
<p>Bufferbloat is the undesirable latency that comes from a router or other network equipment buffering too much data.</p>

<p>The <a href="/bloat/wiki/">Bufferbloat</a> projects provide a webspace for addressing chaotic and laggy network performance. We have a number of projects in flight:</p>
<p>The <a href="{{ "/bloat/wiki/" | relURL }}">Bufferbloat</a> projects provide a webspace for addressing chaotic and laggy network performance. We have a number of projects in flight:</p>


<p>The <strong>Request to FCC for Saner Software Policies</strong> is a response to Docket ET 15-170 which appears to require vendors to lock down the software in Wi-Fi routers, prohibiting experimentation and field testing of new techniques. Read the <a href="https://web.archive.org/web/20160429233622/http://www.businesswire.com/news/home/20151014005564/en#.Vh4ojflViko" class="external">Press Release</a> and our <a href="https://web.archive.org/web/20160429233622/http://huchra.bufferbloat.net/~d/fcc_saner_software_practices.pdf" class="external">Letter to the FCC</a></p>
Expand Down Expand Up @@ -45,8 +45,8 @@ <h3 id="Help">Help Us</h3>
</div>
<div class="col-md-4">
<div class="well well-sm">
<a href="/index.xml">
<img src="/images/feed-icon.svg" alt="RSS feed"
<a href="{{ "/index.xml" | relURL }}">
<img src="{{ "/images/feed-icon.svg" | relURL }}" alt="RSS feed"
width="20" height="20" style="float: right" />
</a>
<h2>News</h2>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.copyright.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p><a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative
Commons License" style="border-width:0"
src="/images/cc-80x15.png"
src="{{ "/images/cc-80x15.png" | relURL }}"
/></a> The content is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
<p> Rather than use web commenting systems, we ask you to refer
to and/or join
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script src="/js/jquery.min.js" type="text/javascript"></script>
<script src="/js/bootstrap.min.js" type="text/javascript"></script>
<script src="{{ "/js/jquery.min.js" | relURL }}" type="text/javascript"></script>
<script src="{{ "/js/bootstrap.min.js" | relURL }}" type="text/javascript"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions layouts/partials/header.includes.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link rel="icon" type="image/png" href="/images/favicon-64x64.png" sizes="64x64" />
<link rel="icon" type="image/png" href="/images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="/images/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="{{ "/images/favicon-64x64.png" | relURL }}" sizes="64x64" />
<link rel="icon" type="image/png" href="{{ "/images/favicon-32x32.png" | relURL }}" sizes="32x32" />
<link rel="icon" type="image/png" href="{{ "/images/favicon-16x16.png" | relURL }}" sizes="16x16" />
{{ range .Site.Params.stylesheets }}
<link href="/css/{{.}}" rel="stylesheet" type="text/css" />{{ end }}
<link href="{{ printf "/css/%s" . | relURL}}" rel="stylesheet" type="text/css" />{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/menu.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if .Section }}{{ partial "section-panel.html" .Section }}{{ end }}
<div class="panel panel-default">
<div class="panel-heading">
<img src="/images/wifi.svg" width="32"></img>
<img src="{{ "/images/wifi.svg" | relURL }}" width="32"></img>
<h4>Find us elsewhere</h4>
</div>
<div class="panel-body">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
{{ range $section, $pages := .Site.Sections }}
<li><a href="/{{$section}}/wiki">{{ title $section }}</a></li>
<li><a href="{{ printf "/%s/wiki" $section | relURL }}">{{ title $section }}</a></li>
{{ end }}
<!--
And here is where you'd add more links to sections, or anywhere you like.
Expand Down
7 changes: 4 additions & 3 deletions layouts/partials/section-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<h4>{{ . | title }} Project</h4>
</div>
<div class="panel-body">
<a href="/{{ . | lower }}/news">News items</a><br />
<a href="/{{ . | lower }}">List of Wiki pages</a><br />
<a href="/{{ . | lower }}/issues">List of bugs</a>
{{ $section := lower . }}
<a href="{{ printf "/%s/news" $section | relURL }}">News items</a><br />
<a href="{{ printf "/%s" $section | relURL }}">List of Wiki pages</a><br />
<a href="{{ printf "/%s/issues" $section | relURL }}">List of bugs</a>
</div>
</div>
2 changes: 1 addition & 1 deletion layouts/shortcodes/attachment.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul class="attachment"><li><a href="/attachments/{{.Get "filename" }}">
<ul class="attachment"><li><a href="{{ printf "/attachments/%s" (.Get "filename") | relURL }}">
{{ .Get "name" }}
</a> ({{ .Get "type" }}{{ if .Get "size" }}; {{ .Get "size" }}{{end}}) {{ .Get "description" }} {{ .Get "author" }}
{{if .Get "date" }}{{ .Get "date" | dateFormat "Jan 2, 2006" }}{{end}}</li></ul>
7 changes: 0 additions & 7 deletions layouts/wiki/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
<!-- Sidebar -->
<div class="col-md-3">
{{ partial "menu.html" . }}
<div class="well well-sm"> <!-- Post-specific stats -->
<h4>{{ .Date.Format "January 2, 2006" }}<br>
<small>{{ .WordCount }} words</small></h4>
<hr>
<strong>Tags</strong><br>
{{ range .Params.tags }}<a class="label label-default" href="/tags/{{ . | urlize }}">{{ . }}</a> {{ end }}
</div>
</div>
</div>
{{ partial "footer.copyright.html" . }}
Expand Down

0 comments on commit 133e4f6

Please sign in to comment.