mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
staticref shortcode: Add "newtab" option to open link in new tab
This commit is contained in:
1 parent
7f9b8acbb2
commit
143576bc99
2 files changed
+6
-2
No files matched your search
@@ -60,7 +60,9 @@ A numbered figure with caption:
|
||||
|
||||
To enable linking to a file, such as a PDF, first place the file in your `static/files/` folder and then link to it using the following form:
|
||||
|
||||
{{%/* staticref "files/cv.pdf" */%}}Download my CV{{%/* /staticref */%}}
|
||||
{{%/* staticref "files/cv.pdf" "newtab" */%}}Download my CV{{%/* /staticref */%}}
|
||||
|
||||
The optional `"newtab"` argument for `staticref` will cause the link to be opened in a new tab.
|
||||
|
||||
## Emojis
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
<a href="{{ .Page.Site.BaseURL }}{{ .Get 0 }}"/>{{ .Inner }}</a>
|
||||
<a href="{{ .Get 0 | absURL }}"{{ if len .Params | eq 2 }} target="_blank"{{ end }}>
|
||||
{{ .Inner }}
|
||||
</a>
|
||||
Reference in new issue
Block a user