Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rcmdnk/octopress-encodeuricomponent
Filter to encode URI component like JavaScript's encodeURIComponent() for Jekyll/Octopress.
https://github.com/rcmdnk/octopress-encodeuricomponent
Last synced: about 1 month ago
JSON representation
Filter to encode URI component like JavaScript's encodeURIComponent() for Jekyll/Octopress.
- Host: GitHub
- URL: https://github.com/rcmdnk/octopress-encodeuricomponent
- Owner: rcmdnk
- License: mit
- Created: 2013-11-28T17:45:52.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-06T15:02:18.000Z (almost 11 years ago)
- Last Synced: 2024-05-01T12:24:44.123Z (7 months ago)
- Language: Ruby
- Size: 123 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
octopress-encodeURIComponent
============================Filter to encode URI component like JavaScript's encodeURIComponent() for Jekyll/Octopress.
# Installation
Copy `plugins/keyboardkey.rb` to your `plugins` directory. That's all!
# Usage
Use as a filter for Liquid values like
This is original: {{site.url}}
This is encoded: {{site.url|encodeURIComponent}}
If the `site.url` is `http://rcmdnk.github.io/`, this will be
This is original: http://rcmdnk.github.io/
This is encoded: http%3A%2F%2Frcmdnk.github.io%2F
This is useful especially if you want to pass uri to such tumblr's share link:
Original buttons ([Buttons | Tumblr](http://www.tumblr.com/buttons)) are provided with additional JavaScript to encode these items.
But you don't need such script with this filter and can write directly in one place.[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rcmdnk/octopress-encodeuricomponent/trend.png)](https://bitdeli.com/free "Bitdeli Badge")