Overview
Jekyll Target Blank is a plugin for Jekyll that automatically adds attributes to all external links in Jekyll’s content. It also provides additional automation features for external links.
Features
- Automatically adds a
target="_blank" rel="noopener noreferrer"attribute to all external links in Jekyll’s content - Excludes plain text links from the automation
- Allows customization of the default behavior for opening links in a new browser tab
- Adds additional CSS classes to qualifying external links
- Overrides the default
relattribute with custom values
Installation
To install Jekyll Target Blank, follow these steps:
- Add the following code snippet to your site’s Gemfile:
gem 'jekyll-target-blank' - Add the following code snippet to your site’s
_config.ymlfile:Note: If your Jekyll version is less than 3.5, use the following code snippet instead:plugins: - jekyll-target-blankgems: - jekyll-target-blank
Summary
Jekyll Target Blank is a useful plugin for Jekyll that automates the process of adding attributes to external links in Jekyll’s content. It offers features such as opening links in a new browser tab, adding CSS classes to links, and customizing the rel attribute. By installing this plugin, users can save time and effort in manually adding these attributes to their external links.