Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rcmdnk/octopress-extlink
octopress-extlink provides "link" tag, used to add target="_blank" for external links.
https://github.com/rcmdnk/octopress-extlink
Last synced: about 1 month ago
JSON representation
octopress-extlink provides "link" tag, used to add target="_blank" for external links.
- Host: GitHub
- URL: https://github.com/rcmdnk/octopress-extlink
- Owner: rcmdnk
- License: mit
- Created: 2013-12-07T20:41:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-08T21:47:25.000Z (almost 11 years ago)
- Last Synced: 2024-05-01T12:24:43.988Z (7 months ago)
- Language: Ruby
- Homepage: http://octopress.dev/blog/2013/12/07/blog-octopress/
- Size: 104 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
octopress-extlink
=================octopress-extlink provides "link" tag for Octopress (Jekyll), used to add `target="_blank"` for external links.
# Installation
1. Copy `plugins/extlink.rb` to your `plugins` directory,
# Usage
Use tag `link` like{%link URL LINK %}
If `URL` starts with `http` like
{%link http://example.com This is an external link. %}
the output becomes
Then, this link will be opend in new window.
If `URL` starts with `/` (i.e. your own site) like:
{%link /mysite This is my site. %}
the output becomes
so that it doesn't make new window.
You can add any attributes to `a` element by giving attributes before the URL (words starting with `http` or `/`), like
{%link class="myclass" http://example.com link %}
The outputs becomes
Multiple attributes can be given.
If you give "target" attribute, it is used instead of above definition.
{%link class="myclass" target="_self" http://example.com This is opend in the same window. %}
This tag will be:
This is opend in the same window.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rcmdnk/octopress-extlink/trend.png)](https://bitdeli.com/free "Bitdeli Badge")