Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vwochnik/jekyll-email-protect
Email protection liquid filter for Jekyll
https://github.com/vwochnik/jekyll-email-protect
Last synced: about 1 month ago
JSON representation
Email protection liquid filter for Jekyll
- Host: GitHub
- URL: https://github.com/vwochnik/jekyll-email-protect
- Owner: vwochnik
- License: mit
- Created: 2015-11-20T00:06:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-19T00:30:06.000Z (over 2 years ago)
- Last Synced: 2024-04-24T16:46:33.190Z (8 months ago)
- Language: Ruby
- Size: 10.7 KB
- Stars: 88
- Watchers: 4
- Forks: 11
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-jekyll-plugins - **Email Protect** - email-protect](https://rubygems.org/gems/jekyll-email-protect)) by Vincent Wochnik -- Email protection liquid filter for Jekyll (Text Filters)
README
# Jekyll Email Protect [![Gem Version](https://badge.fury.io/rb/jekyll-email-protect.png)](http://badge.fury.io/rb/jekyll-email-protect)
> Email protection liquid filter for Jekyll
Jekyll Email Protect is an email protection liquid filter which can be used to obfuscate `mailto:` links to protect an email address from spam bots.
## Installation
This plugin is available as a [RubyGem][ruby-gem].
Add this line to your application's `Gemfile`:
```
gem 'jekyll-email-protect'
```And then execute the `bundle` command to install the gem.
Alternatively, you can also manually install the gem using the following command:
```
$ gem install jekyll-email-protect
```After the plugin has been installed successfully, add the following lines to your `_config.yml` in order to tell Jekyll to use the plugin:
```
gems:
- jekyll-email-protect
```## Getting Started
In your markup, simply use the `encode_email` liquid filter made available through this plugin:
```
{{ '[email protected]' | encode_email }}
```The above code will yield `%65%78%61%6D%70%6C%65@%65%78%61%6D%70%6C%65.%63%6F%6D`. Only use this filter within the `href` attribute of a given link.
## Example
The following example shows how this plugin can be used to protect the `site`'s email address:
```
Contact me
```# Contribute
Fork this repository, make your changes and then issue a pull request. If you find bugs or have new ideas that you do not want to implement yourself, file a bug report.
# Copyright
Copyright (c) 2015 Vincent Wochnik.
License: MIT
[ruby-gem]: https://rubygems.org/gems/jekyll-email-protect