0.0
The project is in a healthy, maintained state
A Jekyll plugin that provides Lucide icons as inline SVGs via a Liquid tag.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 3.7, < 5.0
 Project Readme

Jekyll Lucide

A Jekyll plugin that provides Lucide icons as inline SVGs via a Liquid tag.

Adapted from lucide-rails.

Installation

Add the gem to your Jekyll site's Gemfile:

gem "jekyll-lucide"

Then run bundle install.

Add the plugin to your _config.yml:

plugins:
  - jekyll-lucide

Usage

Use the lucide_icon Liquid tag in your templates:

{% lucide_icon "home" %}
{% lucide_icon "arrow-right" size="32" class="my-icon" %}
{% lucide_icon "search" stroke-width="1.5" %}

You can also use variables for the icon name:

{% lucide_icon page.icon %}
{% lucide_icon item.icon_name size="20" %}

Options

Option Description
size Sets both width and height
class CSS class(es) to add to the SVG
stroke-width Stroke width (default: 2)
stroke Stroke color (default: currentColor)
fill Fill color (default: none)

Any valid SVG attribute can be passed as an option.

Default Attributes

All icons include these default attributes:

aria-hidden="true"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"

Configuration

Set default attributes for all icons in _config.yml:

lucide:
  defaults:
    class: "lucide-icon"
    stroke-width: "1.5"

Available Icons

See the full list of available icons at lucide.dev/icons.

Updating Icons

To fetch the latest icons from Lucide:

bin/fetch-icons

This clones the Lucide repository, processes the SVGs, and updates lib/jekyll-lucide/lucide_version.rb.

License

MIT