I was wondering how to add target="_blank" to a Markdown link.
I tried like below but it didn't work:
[Hugo Host on GitHub](https://gohugo.io/hosting-and-deployment/hosting-on-github/){:target="_blank"}
I鈥檒l add this feature soon
I just found that {:target="_blank"} is not the part of the Goldmark syntax which is Hugo's markdown rendering library.
So, if you want to use target=_blank in Goldmark, You should follow this link
https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks
Or, just use
<a href="http://..." target="_blank">external link</a>
in the markdown file.
Since the markdown render hooks makes all the links to open in a new tab, I'm not going to use it in the theme as default.
So, just use the a tag.
I just found that
{:target="_blank"}is not the part of the Goldmark syntax which is Hugo's markdown rendering library.
So, if you want to usetarget=_blankin Goldmark, You should follow this link
https://gohugo.io/getting-started/configuration-markup#markdown-render-hooksOr, just use
<a href="http://..." target="_blank">external link</a>in the markdown file.
Since the markdown render hooks makes all the links to open in a new tab, I'm not going to use it in the theme as default.
So, just use the
atag.
Ok, thanks for your help.