summaryrefslogtreecommitdiff
path: root/layouts/_shortcodes/newtab.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_shortcodes/newtab.html')
-rw-r--r--layouts/_shortcodes/newtab.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/_shortcodes/newtab.html b/layouts/_shortcodes/newtab.html
index b06fb2d..3f3fe75 100644
--- a/layouts/_shortcodes/newtab.html
+++ b/layouts/_shortcodes/newtab.html
@@ -1,3 +1,10 @@
+{{- /*
+ Link that opens a new tab; protects current window & hides referrer URL
+
+ @context {string} href: target URL
+
+ @example: {{< newtab href="https://some-site.com" >}}Some text to be displayed{{< /newtab >}}
+*/ -}}
<a href="{{ .Get "href" }}" target="_blank" rel="noopener noreferrer">
{{ .Inner }}
</a>