mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
Use relURL
where possible
This commit is contained in:
parent
6562adeb7b
commit
2c664160b0
3 changed files with 6 additions and 6 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue