mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 11:13:06 +00:00
code added to open external links in a new tab
This commit is contained in:
parent
62960a4113
commit
95e07665a7
1 changed files with 5 additions and 0 deletions
5
layouts/_default/_markup/render-link.html
Normal file
5
layouts/_default/_markup/render-link.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<!-- This code opens an external link in a new tab. -->
|
||||||
|
|
||||||
|
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>
|
||||||
|
{{ .Text | safeHTML }}
|
||||||
|
</a>
|
Loading…
Reference in a new issue