[Minor] Change target to _blank for external URLs
This commit is contained in:
parent
8aff75039d
commit
d6597dc213
|
@ -1 +1 @@
|
|||
<p>Built with <a href="https://github.com/matcornic/hugo-theme-learn"><i class="fas fa-heart"></i></a> from <a href="https://getgrav.org">Grav</a> and <a href="https://gohugo.io/">Hugo</a></p>
|
||||
<p>Built with <a href="https://github.com/matcornic/hugo-theme-learn" target="_blank"><i class="fas fa-heart"></i></a> from <a href="https://getgrav.org" target="_blank">Grav</a> and <a href="https://gohugo.io/" target="_blank">Hugo</a></p>
|
||||
|
|
|
@ -41,7 +41,11 @@
|
|||
<ul>
|
||||
{{ range sort . "Weight"}}
|
||||
<li>
|
||||
{{.Pre}}<a class="padding" href="{{.URL | absLangURL }}">{{safeHTML .Name}}</a>{{.Post}}
|
||||
{{ if gt (strings.Count "http" .URL) 0}}
|
||||
{{.Pre}}<a class="padding" href="{{.URL | absLangURL }}" target="_blank">{{safeHTML .Name}}</a>{{.Post}}
|
||||
{{ else }}
|
||||
{{.Pre}}<a class="padding" href="{{.URL | absLangURL }}">{{safeHTML .Name}}</a>{{.Post}}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue