Version
As I use open source software, I usually enumerate them to help spreading the word. And I prefer to do this with site URL and version number.
As the version numbers are changing continuously, I created a small plugin to facilitate access to the version numbers of currently used software.
Liquid code | Return value | Description | Taken from |
---|---|---|---|
{% version albino %} |
- | Albino highlighter’s version | Albino::VERSION |
{% version jekyll %} |
1.3.0 | Jekyll engine’s version | Jekyll::VERSION |
{% version kramdown %} |
1.2.0 | kramdown converter’s version | Kramdown::VERSION |
{% version liquid %} |
2.5.4 | Liquid template’s version | gem specification |
{% version maruku %} |
0.6.1 | Maruku converter’s version | MaRuKu::Version |
{% version pygments %} |
0.5.4 | pygments.rb highlighter’s version | gem specification |
{% version ruby %} |
1.9.2 | Ruby interpreter’s version | RUBY_VERSION |
Usage
version
is a Liquid tag, so you just enclose it in {%
and %}
. The parameter is mandatory, if not specified or invalid, an empty string is
returned :
Generated by Jekyll version {% version jekyll %}
Configuration
None.
Versions
- 0.0 - January 2012
- Initial release.
- 0.1 - February 2012
- Added Albino, Maruku and kramdown version number.
- 0.2 - February 2012
- Added Liquid version number.
- 0.3 - November 2013
- Added Pygments version number.
Plans
- Introduce a joker parameter to get the version of the currently used Markdown converter.
- Provide release dates too.
Download
You can find the related files on GitHub in my Jekyll-plugin repository’s version directory :
- version.rb - script