A plugin that makes it easy to incorporate Simple Icons into your Jekyll website, providing access to a vast collection of popular brands icons.
{% simpleicons ICON_NAME %} to your Jekyll pageimg tag with per-icon alt attribute for accessibilityGemfile in the :jekyll_plugins group:group :jekyll_plugins do
gem 'jekyll-simple-icons'
end
Run bundle install
Add the following to your website _config.yml file:
plugins:
- jekyll-simple-icons
Alternatively, you can get code straight from this repository. Code from main branch should be stable enough but may contain unreleased software with bugs or breaking changes. Unreleased software should be considered of beta quality.
group :jekyll_plugins do
gem 'jekyll-simple-icons', git: 'https://github.com/pirafrank/jekyll-simple-icons', branch: 'main'
end
bundle update jekyll-simple-icons
Use the tag as follows:
{% simpleicons ICON_NAME %}
where ICON_NAME is the name of the icon you want to use.
You can optionally specify the color, dark, h (or height) and w (or width) attributes.
Defaults to color:black h:32 w:32 and dark not set.
When the dark attribute is specified, the SVG will include a @media (prefers-color-scheme:dark) query with the specified color. This enables automatic color switching when the browser is in dark mode.
{% simpleicons github %}
{% simpleicons github color:purple dark:cyan %}
{% simpleicons github color:green h:24 w:24 %}
{% simpleicons github color:gray dark:purple height:48 width:48 %}
Clone and run bundle install to get started.
Code lives in lib/jekyll directory. lib/jekyll-simple-icons/simple_icons.rb is the entry point of the plugin at Jekyll runtime, as per Jekyll documentation. More details here.
Bug reports and pull requests are welcome on GitHub.
Everyone interacting in the project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
This plugin is provided as is, without any guarantee.
The gem is available as open source under the terms of the MIT License. Any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.
Simple Icons keeps its own license as it is not part of this codebase.