Merge pull request #102 from RealOrangeOne/master

Use `relURL`  where possible
This commit is contained in:
Mathieu Cornic 2018-01-17 22:27:00 +01:00 committed by GitHub
commit 7ec195a7f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -48,8 +48,8 @@
</p>
<p>{{T "message-404"}}</p>
<p></p>
<p><a href="{{.Site.BaseURL}}">{{T "Go-to-homepage"}}</a></p>
<p><img src="{{ .Site.BaseURL }}/images/gopher-404.jpg" style="width:50%"></img></p>
<p><a href='{{ "" | relURL }}'>{{T "Go-to-homepage"}}</a></p>
<p><img src='{{ "/images/gopher-404.jpg" | relURL }}' style="width:50%"></img></p>
</div>
</div>

View file

@ -8,9 +8,9 @@
<script type="text/javascript" src="{{"js/auto-complete.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
<script type="text/javascript">
{{ if .Site.IsMultiLingual }}
var baseurl = "{{.Site.BaseURL}}{{.Site.LanguagePrefix}}";
var baseurl = "{{.Site.LanguagePrefix | relURL }}";
{{ else }}
var baseurl = "{{.Site.BaseURL}}";
var baseurl = '{{ "" | relURL }}';
{{ end }}
</script>
<script type="text/javascript" src="{{"js/search.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>

View file

@ -14,7 +14,7 @@
{{if ($.Get "pattern")}}
{{if (findRE ($.Get "pattern") .Name)}}
<li>
<a href="{{ printf "%s/%s%s/%s" $.Site.BaseURL $fileDir ($.Scratch.Get "filesName") .Name }}" >
<a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" >
{{.Name}}
</a>
({{div .Size 1024 }} ko)
@ -22,7 +22,7 @@
{{end}}
{{else}}
<li>
<a href="{{ printf "%s/%s%s/%s" $.Site.BaseURL $fileDir ($.Scratch.Get "filesName") .Name }}" >
<a href="{{ (printf "%s%s/%s" $fileDir ($.Scratch.Get "filesName") .Name) | relURL }}" >
{{.Name}}
</a>
({{div .Size 1024 }} ko)