Awesome
jekyll_random_hex
jekyll_random_hex
is a Jekyll tag plugin that outputs a string of random hexadecimal characters of any length.
Defaults to a six-character string.
Usage
Example: Generate 6 random characters:
{{ random_hex_string }}
Example: generate 20 random characters. Each hex digit expands to 2 characters, so 10 hex digits yields 20 characters.
{{ random_hex_string 10 }}
Installation
Add this line to your application's Gemfile:
gem 'jekyll_random_hex'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install jekyll_random_hex
Additional Information
More information is available on Mike Slinn’s website.
Development
After checking out the repo, run bin/setup
to install dependencies.
You can also run bin/console
for an interactive prompt that will allow you to experiment.
Build and Install Locally
To build and install this gem onto your local machine, run:
$ bundle exec rake install
The following also does the same thing:
$ bundle exec rake install
Examine the newly built gem:
$ gem info jekyll_random_hex
*** LOCAL GEMS ***
jekyll_random_hex (1.0.0)
Author: Mike Slinn
Homepage:
https://github.com/mslinn/jekyll_random_hex
License: MIT
Installed at: /home/mslinn/.gems
Generates Jekyll logger with colored output.
Build and Push to RubyGems
To release a new version,
- Update the version number in
version.rb
. - Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
- Run the following:
The above creates a git tag for the version, commits the created tag, and pushes the new$ bundle exec rake release
.gem
file to RubyGems.org.
Contributing
- Fork the project
- Create a descriptively named feature branch
- Add your feature
- Submit a pull request
License
The gem is available as open source under the terms of the MIT License.