Search code examples
markdownjekylljekyll-extensionskramdownmultimarkdown

modify link behaviour in Jekyll


I have an itchy issue I definitely need solve.

Every time I insert a link in my Jekyll website, independently if I write it in a Markdown file or an HTML file, I write the following:

<a href="http://example.com" rel="noopener noreferrer" target="_blank">example</a>

Obviously, it's way longer, more boring and more stressful than typing

[example](example.com)

Is there a way I can add by default the rel and target attributes (maybe in the _config.yml file) for every link so that I can easily insert a simple <a> tag and then it's parsed with all the extra stuff?

I know I could insert attributes also in Markdown, like this, but it's still quite a lot of typing...

Thanks a lot in advance, this would definitely change my game!


Solution

  • My past Jekyll project was able to leverage a fork of Jekyll Target Blank that added rel and target attributes to <a> tags.