Hugo Shortcodes
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

New Tab Link

How to use

# file.md

{{< new_tab_link title="Probably Google" url="https://google.com/" >}} 

Shortcode

# new_tab_link.html

<a href="{{ .Get "url" }}" target="_blank">{{ with .Get "title" }}{{.}}{{else}}{{.Get "url"}}{{end}}</a>

Sample

A link in a sentence that’s Probably Google or something.


Source