š Howdy! Welcome to the v 0.2.0
of Jekyll::Cover
, a custom command to build og:image
for new posts through the command line.
I did not want to open Figma anymore, and decided that running something like jekyll cover --path /path/to/my/post/
would be faster! And building the gem would be more fun.
Here's a sample of an image built with Jekyll::Cover
.
This picture is a mix of rmagick
canvas and image manipulation, a couple of .png
s stored on my website (namely the picture of my face, and the hand-drawn mountain), and the text is extracted from the post's front matter.
This gem does a few things:
rmagick
,Want to use Jekyll::Cover
with your Jekyll blog? Here how to do it:
group :jekyll_plugins do
gem 'jekyll-cover', git: 'https://github.com/your_username/jekyll-cover.git', branch: 'main'
end
bundle install
jekyll cover
command! āØ bundle exec jekyll cover -p _posts/path-to-your-new-post.md
cover_image
variable./media
folder.Jekyll::Cover::CoverImage::CATEGORIES_DECORS
constant: those are files I use to decorate my cover image based on the post category. You should change those.Jekyll::Cover::FrontMatter::DEFAULT_VARIABLES
constant. You might want to change its content.ā ļø I built this gem is for my personal use and on my personal time, hence it's very crude, untested, and only works for the quirks of my own website.
I'll probably make it more usable for others in the future, but for now, it's mostly a personal proof of concept.
Update 10 Jul 2024: V 0.2.0
is out!
V 0.2.0
does exactly the same thing as v0.1.0, but better š:
Still a lot of rough edges, but I'm happy to move toward a more flexible command that'll eventually allow other people to use the gem off the shelf.
The idea for building a gem was born from my own itch ("How can I generate posts' cover images with a Jekyll command?") and from reading Rebuilding Rails by Noah Gibbs.