Disclaimer: I dont know ruby. Not even know how to print hello world. So dont blame me for using bash
Check my site's footer. You'll see a site version ####
. What is it ? Its just a fancy jekyll plugin i created that shows a version based on git commit. Everytime you add a new commit to your site source, the version increases.
Q: Why need it ?
A: It looks cool. It gives me internal peace of mind. Moreover If you publish your site in places like github pages, from version you can check if your site is deployed yet.
Installation
- Get getversion.rb and place it in your
plugins
folder. Now open any layout and add
{% get_version %}
in it. Example: I added it in my_includes/custom/footer.html
<span class="credit">site version {% get_version %}</span>
Since it works based on git, you need a git tag to generate a version number. If you dont have any git-tag yet, create a new tag. Note that tag name will be used as prefix in the version. To create a tag named
MySite
git tag -a MySite
Now regenerate your site using
rake generate
and you are done.
Let me know how much you like this plugin