Skip to content

Commit

Permalink
Remove / after baseurl to avoid // problem in Gorouter & net/url
Browse files Browse the repository at this point in the history
  • Loading branch information
nota-ja committed Oct 27, 2015
1 parent 0d88058 commit 4c96e2b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ <h4>{{ .Title }}</h4>
<p>
{{if .Params.categories }}
{{ range $index, $category := .Params.categories }}
<a href="{{$baseurl}}/categories/{{ $category | urlize }}/">{{ $category }}</a>
<a href="{{$baseurl}}categories/{{ $category | urlize }}/">{{ $category }}</a>
{{ end }}
{{end}}
</p>
<p>{{ .Content }}</p>
<p>{{ .Date.Format "2 Jan 2006" }}
{{if .Params.tags }}
{{ range $index, $tag := .Params.tags }}
<a href="{{$baseurl}}/tags/{{ $tag | urlize }}/">#{{ $tag }}</a>
<a href="{{$baseurl}}tags/{{ $tag | urlize }}/">#{{ $tag }}</a>
{{ end }}
{{end}}
</p>
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

<div class="collection">
{{ range $key, $value := .Data.Terms }}
<a href="{{$baseurl}}/{{ $data.Plural }}/{{ $key | urlize }}" class="collection-item">{{ if eq $data.Plural "tags"}}<i class="mdi-action-loyalty left"></i>{{else}}<i class="mdi-action-perm-media left"></i>{{end}}{{ $key }}<div class="secondary-content">{{ len $value }}</div></a>
<a href="{{$baseurl}}{{ $data.Plural }}/{{ $key | urlize }}" class="collection-item">{{ if eq $data.Plural "tags"}}<i class="mdi-action-loyalty left"></i>{{else}}<i class="mdi-action-perm-media left"></i>{{end}}{{ $key }}<div class="secondary-content">{{ len $value }}</div></a>
{{ end }}
</div>

</div>
</div>
{{ partial "footer.html" . }}
{{ partial "footer.html" . }}
4 changes: 2 additions & 2 deletions layouts/partials/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<p>
{{if .Params.categories }}
{{ range $index, $category := .Params.categories }}
<a href="{{$baseurl}}/categories/{{ $category | urlize }}/">{{ $category }}</a>
<a href="{{$baseurl}}categories/{{ $category | urlize }}/">{{ $category }}</a>
{{ end }}
{{end}}
</p>
Expand All @@ -20,7 +20,7 @@ <h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
{{ .Date.Format "2 Jan 2006" }}
{{if .Params.tags }}
{{ range $index, $tag := .Params.tags }}
<a href="{{$baseurl}}/tags/{{ $tag | urlize }}/">#{{ $tag }}</a>
<a href="{{$baseurl}}tags/{{ $tag | urlize }}/">#{{ $tag }}</a>
{{ end }}
{{end}}
</p>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</div>
</footer>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="{{.Site.BaseURL}}/js/materialize.min.js"></script>
<script src="{{.Site.BaseURL}}/js/init.js"></script>
<script src="{{.Site.BaseURL}}js/materialize.min.js"></script>
<script src="{{.Site.BaseURL}}js/init.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{with .Site.Params.googleAnalyticsUserID }}
Expand Down
28 changes: 14 additions & 14 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
<title>{{ .Title }}</title>
<link href="{{.Site.BaseURL}}/css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="{{.Site.BaseURL}}/css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="{{.Site.BaseURL}}css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="{{.Site.BaseURL}}css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/default.min.css">
<style type="text/css">
{{if .Site.Params.footerCover}}
footer.page-footer{background-image: url({{.Site.BaseURL}}/{{.Site.Params.footerCover}});}
footer.page-footer{background-image: url({{.Site.BaseURL}}{{.Site.Params.footerCover}});}
{{else}}
footer.page-footer{background-image: url({{.Site.BaseURL}}/images/default.png);}
footer.page-footer{background-image: url({{.Site.BaseURL}}images/default.png);}
{{end}}
</style>
</head>
<body>
<ul id="slide-out" class="side-nav">
<li><a href="{{.Site.BaseURL}}"><i class="mdi-action-home left"></i>Home<i class="mdi-hardware-keyboard-arrow-right right"></i></a></li>
<li><a href="{{.Site.BaseURL}}/categories"><i class="mdi-action-perm-media left"></i>Categories<i class="mdi-hardware-keyboard-arrow-right right"></i></a></li>
<li><a href="{{.Site.BaseURL}}/tags"><i class="mdi-action-loyalty left"></i>Tags<i class="mdi-hardware-keyboard-arrow-right right"></i></a></li>
<li><a href="{{.Site.BaseURL}}categories"><i class="mdi-action-perm-media left"></i>Categories<i class="mdi-hardware-keyboard-arrow-right right"></i></a></li>
<li><a href="{{.Site.BaseURL}}tags"><i class="mdi-action-loyalty left"></i>Tags<i class="mdi-hardware-keyboard-arrow-right right"></i></a></li>
</ul>
<div id="index-banner" class="parallax-container">
<a data-activates="slide-out" class="btn-floating button-collapse" style="top: 5px; left: 5px;"><i class="mdi-navigation-menu"></i></a>
Expand All @@ -32,29 +32,29 @@ <h5 class="header col s12 light">{{.Site.Params.description}}</h5>
</div>
<div class="row center">
{{if .Site.Params.github}}
<a href="https://github.com/{{ .Site.Params.github }}"><img src="{{.Site.BaseURL}}/images/github2-dreamstale35.png"></a>
<a href="https://github.com/{{ .Site.Params.github }}"><img src="{{.Site.BaseURL}}images/github2-dreamstale35.png"></a>
{{end}}
{{if .Site.Params.facebook}}
<a href="https://www.facebook.com/{{.Site.Params.facebook}}"><img src="{{.Site.BaseURL}}/images/facebook-dreamstale25.png"></a>
<a href="https://www.facebook.com/{{.Site.Params.facebook}}"><img src="{{.Site.BaseURL}}images/facebook-dreamstale25.png"></a>
{{end}}
{{if .Site.Params.twitter}}
<a href="https://twitter.com/{{.Site.Params.twitter}}"><img src="{{.Site.BaseURL}}/images/twitter-dreamstale71.png"></a>
<a href="https://twitter.com/{{.Site.Params.twitter}}"><img src="{{.Site.BaseURL}}images/twitter-dreamstale71.png"></a>
{{end}}
{{if .Site.Params.gplus}}
<a href="https://google.com/+{{.Site.Params.gplus}}"><img src="{{.Site.BaseURL}}/images/gplus48x48.png"></a>
<a href="https://google.com/+{{.Site.Params.gplus}}"><img src="{{.Site.BaseURL}}images/gplus48x48.png"></a>
{{end}}
{{if .Site.Params.linkedin}}
<a href="https://www.linkedin.com/in/{{.Site.Params.linkedin}}"><img src="{{.Site.BaseURL}}/images/linkedin-dreamstale45.png"></a>
<a href="https://www.linkedin.com/in/{{.Site.Params.linkedin}}"><img src="{{.Site.BaseURL}}images/linkedin-dreamstale45.png"></a>
{{end}}
<a href="{{.Site.BaseURL}}/index.xml"><img src="{{.Site.BaseURL}}/images/feed-dreamstale27.png"></a>
<a href="{{.Site.BaseURL}}index.xml"><img src="{{.Site.BaseURL}}images/feed-dreamstale27.png"></a>
</div>
</div>
</div>
<div class="parallax">
{{if .Site.Params.headerCover}}
<img src="{{.Site.BaseURL}}/{{.Site.Params.headerCover}}">
<img src="{{.Site.BaseURL}}{{.Site.Params.headerCover}}">
{{else}}
<img src="{{.Site.BaseURL}}/images/default.png">
<img src="{{.Site.BaseURL}}images/default.png">
{{end}}
</div>
</div>

0 comments on commit 4c96e2b

Please sign in to comment.