I researched how to make product and website links open in a new tab, and here are my notes.
Hugo’s Markdown engine is blackfriday.
blackfriday has an hrefTargetBlank
option for <a href="" target="_blank">
, which allows links to open in a new tab.
The setup is very simple.
For config.toml
, use this:
[blackfriday]
hrefTargetBlank = true
For config.yml
, use this:
blackfriday:
hrefTargetBlank: true
After that, just restart the server.