AndreasAhrens.se


Views, guides, tech stuff, Cryptocurrencies and ICOs from the mind of Andreas Ahrens

Tags


AndreasAhrens.se

Getting target="_blank" into ghost links

10th February 2016

While writing my [seeds.rb](http://andreasahrens.se/seeds-rb-for-countries-of-the-world-in-ruby/" target="_blank) article I noticed that all links by default load in the same tab with no way of setting the target. A quick googling later, I found [a blog](http://www.mseri.me/a-great-workaround-for-targeting-links-in-ghost/" target="blank) that had had the solution. Simply add:

" target="_blank

to the end of each link. So instead of just writing:

[Amazing blog!](http://andreasahrens.se)

you write

[Amazing blog!](http://andreasahrens.se" target="_blank)

since ghost automatically adds " at the beginning and end of each link. That means the above code will render as:

<a href="http://andreasahrens.se" target="_blank">Amazing blog!</a>

Pretty nifty trick!

View Comments