diff options
author | Sebastian Pech <windows@spech.de> | 2020-04-12 14:57:47 +0300 |
---|---|---|
committer | Sebastian Pech <windows@spech.de> | 2020-04-12 14:57:47 +0300 |
commit | 8ddab5e8e29f8bebe62c88cec7757561f83de6e5 (patch) | |
tree | a54da123cb634f8e85dce41a03df05d5489bfdb0 | |
parent | 8203c097260907b54a90e883b6621591d939a224 (diff) |
external link in new window
-rw-r--r-- | layouts/_default/_markup/render-link.html | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 0000000..d1eef46 --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1 @@ +<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}{{ if strings.HasPrefix .Destination "https://amzn.to" }} <i class="fab fa-amazon"></i>{{ end }}{{ if strings.HasPrefix .Destination "https://github" }} <i class="fab fa-github"></i>{{ end }}</a>
\ No newline at end of file |