diff options
author | Sebastian Pech <windows@spech.de> | 2020-04-12 14:57:42 +0300 |
---|---|---|
committer | Sebastian Pech <windows@spech.de> | 2020-04-12 14:57:42 +0300 |
commit | 2668f9b18e41e2649d6ec5f8d334c92673be9ad8 (patch) | |
tree | a7181e287976d73ee30aa31d28fb290f30f5dc2f | |
parent | 2b53e21a5279c0892ac267b5c0790f7ce40c8ab5 (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 |