Published 2020-10-03.
Last modified 2023-05-18.
Time to read: 1 minutes.
jekyll_plugins
collection.
jekyll_badge
displays a badge for a software package on pages in Jekyll-powered web.
You can see the badge for this package to the right.
The software version of the package is shown.
Clicking on the badge takes you to its information page.
Installation
Add the following highlighted line to your Jekyll project's Gemfile
,
within the jekyll_plugins
group:
group :jekyll_plugins do gem 'jekyll_badge' end
And then execute:
$ bundle
Image
Copy the contents of demo/blog/images/git/
to a similarly named directory on your website.
Usage Examples
The code on the left generates the badge on the right:
{% jekyll_badge align='right' name='jekyll_pre' %}
{% jekyll_badge align='right' class='bg_yellow_nopad rounded shadow' name='jekyll_pre' %}
{% jekyll_badge align='right' class='bg_pink_nopad rounded shadow' label='Jekyll Pre' name='jekyll_pre' style='border: dashed;' %}
Override the URL for the git repository:
{% jekyll_badge name="jekyll_flexible_include" git_url="https://github.com/mslinn/jekyll_flexible_include_plugin" %}