All Projects → d-ogarkov → jekyll-extlinks

d-ogarkov / jekyll-extlinks

Licence: MIT license
This Jekyll plugin adds custom attributes (rel="nofollow", target="_blank", etc.) to external links in your content.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to jekyll-extlinks

Jekyll Minifier
Jekyll HTML/XML/CSS/JS Minifier utilising yui-compressor, and htmlcompressor
Stars: ✭ 215 (+1094.44%)
Mutual labels:  jekyll-plugin, ruby-gem
jekyll-gzip
Generate gzipped assets and files for your Jekyll site at build time
Stars: ✭ 34 (+88.89%)
Mutual labels:  jekyll-plugin, ruby-gem
Amp Jekyll
Build Accelerated Mobile Page versions of your Jekyll posts
Stars: ✭ 278 (+1444.44%)
Mutual labels:  jekyll-plugin, ruby-gem
Pages Gem
A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
Stars: ✭ 1,670 (+9177.78%)
Mutual labels:  jekyll-plugin, ruby-gem
Jekyll Minibundle
A minimalistic asset bundling plugin for Jekyll
Stars: ✭ 65 (+261.11%)
Mutual labels:  jekyll-plugin, ruby-gem
Jekyll Embed Video
Embed videos in Jekyll webpages without a plugin (Youtube, Vimeo, Twitch, Streamable, Mixer, Google Drive clips + more)
Stars: ✭ 135 (+650%)
Mutual labels:  jekyll-plugin
Jekyll Gist
📃 Liquid tag for displaying GitHub Gists in Jekyll sites.
Stars: ✭ 218 (+1111.11%)
Mutual labels:  jekyll-plugin
Jekyll Timeago
⌛️ Ruby library to compute distance of dates in words. Originally built for Jekyll.
Stars: ✭ 130 (+622.22%)
Mutual labels:  jekyll-plugin
stackup
a simple CLI and Ruby API for AWS CloudFormation
Stars: ✭ 89 (+394.44%)
Mutual labels:  ruby-gem
Jekyll Admin
A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites.
Stars: ✭ 2,531 (+13961.11%)
Mutual labels:  jekyll-plugin
Hanuman
A responsive, lightning-fast Jekyll theme built using AMP (Accelerated Mobile Pages) to speed up your blogs and websites.
Stars: ✭ 100 (+455.56%)
Mutual labels:  jekyll-plugin
Jekyll Analytics
Plugin to easily add webanalytics to your jekyll site. Currently Google Analytics, Piwik and mPulse are supported.
Stars: ✭ 166 (+822.22%)
Mutual labels:  jekyll-plugin
gcra-ruby
Generic cell rate algorithm (leaky bucket) implementation for rate limiting
Stars: ✭ 49 (+172.22%)
Mutual labels:  ruby-gem
Jekyll Sass Converter
A Sass converter for Jekyll.
Stars: ✭ 133 (+638.89%)
Mutual labels:  jekyll-plugin
jekyll-lazy-tweet-embedding
🐣 A Jekyll plugin to embed the Twitter cards into {.html, .md} pages, by just pasting tweet urls
Stars: ✭ 52 (+188.89%)
Mutual labels:  jekyll-plugin
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+988.89%)
Mutual labels:  jekyll-plugin
busser-rspec
Run RSpec tests through busser
Stars: ✭ 12 (-33.33%)
Mutual labels:  ruby-gem
Jekyll Remote Theme
Jekyll plugin for building Jekyll sites with any GitHub-hosted theme
Stars: ✭ 188 (+944.44%)
Mutual labels:  jekyll-plugin
Github Metadata
Jekyll plugin to propagate the `site.github` namespace and set default values for use with GitHub Pages.
Stars: ✭ 184 (+922.22%)
Mutual labels:  jekyll-plugin
memo wise
The wise choice for Ruby memoization
Stars: ✭ 486 (+2600%)
Mutual labels:  ruby-gem

Jekyll ExtLinks

This Jekyll plugin adds custom attributes (rel="nofollow", target="_blank", etc.) to external links in your content.

Description

This Jekyll plugin adds custom attributes to external links in your content. For example, you can add rel="nofollow" to all external links by default (with exceptions if you need them), or something like class="external". You can also use it to add target="_blank" to external links, but generally it is not recommended as it leads to bad user experience. Multiple attributes are allowed.

Installation

  1. Install the gem from RubyGems: gem install jekyll-extlinks. The Nokogiri gem is required. If you experience any problems installing Nokogiri ("ERROR: Failed to build gem native extension", etc.), run gem update --system and try again.

  2. Add this to your project's Gemfile:

gem 'jekyll-extlinks'
  1. Add this to your project's _config.yml:
plugins:
  - jekyll-extlinks

Configuration

Configure the plugin in your _config.yml. Notice the indentation matters. Example:

extlinks:
  attributes: {rel: nofollow, target: _blank}
  rel_exclude: ['host1.com', 'host2.net']
  • attributes are required - at least one of them; rel_exclude is optional
  • Links to hosts listed in rel_exclude will not have the rel attribute set
  • Links which have the rel attribute already will keep it unchanged, like this one in Markdown: [Link text](http://someurl.com){:rel="dofollow"}
  • Relative links will not be processed
  • Don't forget to actually use the plugin (see below)

Usage

Use the plugin in your Jekyll layouts: {{ content | extlinks }}

Notes

Developed by Dmitry Ogarkov - http://ogarkov.com/jekyll/plugins/extlinks/

Based on http://dev.mensfeld.pl/2014/12/rackrails-middleware-that-will-ensure-relnofollow-for-all-your-links/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].