# Add Plugins?

**URL:** <https://zola.discourse.group/t/add-plugins/710>\
**Category:** Feature requests\
**Created:** [December 3, 2020, 5:13am UTC](https://zola.discourse.group/t/add-plugins/710 "2020-12-03T05:13:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![evan-brass](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/evan-brass/32/370_2.png) [@evan-brass](https://zola.discourse.group/u/evan-brass)\
**Post date:** [December 3, 2020, 5:13am UTC](https://zola.discourse.group/t/add-plugins/710/1 "2020-12-03T05:13:54Z")

</div>

Any thoughts on plugins?

I had a need for math. I ended up using a Tera filter to turn asciimath into mathml and a shortcode, which made me think that Tera filters could be a great spot for plugins. Where else could plugins fit? Are plugins a good idea?

---

<div class="post-metadata">

**Author:** ![dertuxmalwieder](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/dertuxmalwieder/32/336_2.png) [@dertuxmalwieder](https://zola.discourse.group/u/dertuxmalwieder)\
**Post date:** [December 3, 2020, 6:09am UTC](https://zola.discourse.group/t/add-plugins/710/2 "2020-12-03T06:09:32Z")

</div>

The problem with plug-ins is that they would either be not very mighty or require a built-in scripting language. Assuming that @keats will never accept code which cannot be plugged right into the Zola binary, that limits our choices (which is a good thing, honestly).

My own SSG (which I won’t advertise here) uses the Duktape JavaScript engine for that, with a number of predefined hooks throughout the application. There are at least a few Rust Duktape wrappers, so it would be an option.

The more interesting question is which missing feature plug-ins would actually need to cover and whether that feature shouldn’t better be baked into Zola. And here I need to vote for the latter, I’m afraid - for security and performance reasons.

---

<div class="post-metadata">

**Author:** ![evan-brass](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/evan-brass/32/370_2.png) [@evan-brass](https://zola.discourse.group/u/evan-brass)\
**Post date:** [December 3, 2020, 6:36am UTC](https://zola.discourse.group/t/add-plugins/710/3 "2020-12-03T06:36:38Z")

</div>

I was thinking maybe dynamic linking? Zola could load a dll that exports Tera filters for example. That would be powerful without needing to embed a scripting engine. I’m not sure what other places would be easy / useful to add hooks. Adding Tera filters is the only spot I can think of right now.

I admit that there’s probably not a huge user experience improvement between writing a dylib and just forking Zola so… it’s just a thought.

---

<div class="post-metadata">

**Author:** ![dertuxmalwieder](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/dertuxmalwieder/32/336_2.png) [@dertuxmalwieder](https://zola.discourse.group/u/dertuxmalwieder)\
**Post date:** [December 3, 2020, 6:38am UTC](https://zola.discourse.group/t/add-plugins/710/4 "2020-12-03T06:38:03Z")

</div>

> [@evan-brass](#):
>
> Adding Tera filters is the only spot I can think of right now.

Then, maybe, this should rather be a Tera feature request.

---

<div class="post-metadata">

**Author:** ![Goldstein](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/goldstein/32/451_2.png) [@Goldstein](https://zola.discourse.group/u/Goldstein)\
**Post date:** [March 5, 2021, 10:00am UTC](https://zola.discourse.group/t/add-plugins/710/5 "2021-03-05T10:00:57Z")

</div>

Lua could be statically linked into binary and is quite easy to interop with (via mlua crate, for example).

I’m trying to integrate Lua into Zola fork for my own blog (because plugins is a critical feature for me). I would be happy to make PR into upstream and/or make my patches public.

---

<div class="post-metadata">

**Author:** ![Goldstein](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/goldstein/32/451_2.png) [@Goldstein](https://zola.discourse.group/u/Goldstein)\
**Post date:** [March 7, 2021, 7:15pm UTC](https://zola.discourse.group/t/add-plugins/710/6 "2021-03-07T19:15:13Z")

</div>

I made a prototype of Zola-with-plugins.

> **[GoldsteinE/pepel](https://github.com/GoldsteinE/pepel)**
>
> Contribute to GoldsteinE/pepel development by creating an account on GitHub.

It’s horrible, slow and horrible, but it works for me.  
Example plugins:

> <https://gist.github.com/GoldsteinE/ef20aa4fc07a6211d410c0dacf53f768>

---

<div class="post-metadata">

**Author:** ![Cobalt](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/cobalt/32/558_2.png) [@Cobalt](https://zola.discourse.group/u/Cobalt)\
**Post date:** [July 6, 2021, 10:35pm UTC](https://zola.discourse.group/t/add-plugins/710/7 "2021-07-06T22:35:58Z")

</div>

I made a proposal for plugins. Maybe dynamic loading would be a (fast) way to go

---

<div class="post-metadata">

**Author:** ![0xcrypto](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/0xcrypto/32/1150_2.png) [@0xcrypto](https://zola.discourse.group/u/0xcrypto)\
**Post date:** [December 23, 2023, 4:43am UTC](https://zola.discourse.group/t/add-plugins/710/8 "2023-12-23T04:43:51Z")

</div>

Can you link where the proposal is? I can’t find it.
