summaryrefslogtreecommitdiffstats
path: root/layouts/_default/_markup/render-link.html
diff options
context:
space:
mode:
authoramzrk22020-04-13 23:33:25 +0800
committeramzrk22020-04-13 23:33:25 +0800
commit9ee6dcd1dba6beb8ae997e80f8bf5572d49aa4de (patch)
treedd32d8d80b57f889a5c3b346d469e87338c7df31 /layouts/_default/_markup/render-link.html
parent3078d570f6781b24b34e7793dd7d0394cb77b01f (diff)
downloadhugo-theme-fuji-9ee6dcd1dba6beb8ae997e80f8bf5572d49aa4de.tar.gz
hugo-theme-fuji-9ee6dcd1dba6beb8ae997e80f8bf5572d49aa4de.tar.bz2
hugo-theme-fuji-9ee6dcd1dba6beb8ae997e80f8bf5572d49aa4de.zip
Use hooks to let in-post links open in new tab
Diffstat (limited to 'layouts/_default/_markup/render-link.html')
-rw-r--r--layouts/_default/_markup/render-link.html1
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..a5cd49a
--- /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"{{ end }}>{{ .Text | safeHTML }}</a> \ No newline at end of file