Can I create jekyll plugins using only Liquid?

Hi:

Is it possible to write new plugins not using Ruby but Liquid instead?

ChatGPT says yes, sure, but I can’t trust it!

I’ve been searching for examples but I’m suspecting is not the case.

I know how versatile Ruby is but I really prefer something lighter for the moment.

Thanks in advance.

You can get pretty far with liquid partials and include (you can even do recursive includes)

However, there are some things, such as creating your own liquid filters/tags or generating extra pages, that you will not be able to do without writing some ruby

2 Likes

The answer to that is yes and no. If you want to create a Jekyll plugin in the formal sense of the word, then you will need to write some Ruby code.

That said, it depends on what you want to do. For example, let’s say you use the Jekyll SEO plugin or the RSS feed plugin. You can write all that same code into your files using Liquid.

Just yesterday, I explained how you can add SEO tags to your website without the plugin. You can see that link here.

Let’s say you wanted to create your own custom RSS feed without using or creating a plugin. You can create a file called feed.rss (or whatever), add the following lines to the top of the file:

---
---

That tells Jekyll to process the file. Then, you can type up your RSS feed file and include Liquid content.

Other plugins do something more. For example, maybe you have a plugin that uses ImageMagick to create multiple image sizes for a file automatically. You will not accomplish that with Liquid alone, and you will have to write a plugin if you want Jekyll to perform such a function automatically.

3 Likes