Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, plugins are not supported in any meaningful way. With Jekyll I can write "_plugins/foo.rb" and put any code in there to add new Liquid template tags, new features, change behaviour, and even monkey-patch hard-coded core Jekyll code.[1] I can't do this with GoJekyll, because Go doesn't really provide a good mechanism for this kind of thing.

What it does have is a bunch of optional features that are typically provided by plugins in Jekyll[2], but this is a very different meaning of "plugins" that Jekyll has.

[1]: Whether you should be doing this is a different issue, but I would argue that for a static website builder it's fine, especially since you can just lock the Jekyll version with little downsides, and Jekyll doesn't change that often in the first place.

[2]: A list of them: https://github.com/osteele/gojekyll/blob/main/docs/plugins.m...



Having been on the other side of a messy ruby project, which had large parts of itself overridden by some addon scripts, maybe that's a good thing!


Context is everything. In the context of Jekyll, all of this is certainly a useful feature: this is not code that needs to be re-used or maintained in the same way as your Rails project has to be.

As always, engage your brain before doing anything and you don't need to use these features, but it gives you the tools to do "smart things" that Go simply can't. This, among other things, means that Jekyll will scale reasonably well with your website as your needs grow, without having to add features to Jekyll core, using your own fork of Jekyll, or switching to something completely different.

For example, I have a little plugin[1] to work around a bug[2] and to skip the hard-coded requirement to have a date in the filename.[3] Is this ugly? Yes. Is this fine to generate a relatively simple personal website? Also yes.

[1]: https://github.com/arp242/arp242.net/blob/master/_plugins/no...

[2]: https://github.com/jekyll/jekyll/issues/8707

[3]: https://stackoverflow.com/a/68287682/660921


I’m having some nightmare flashbacks to the “plugin” ecosystems of various PHP CMSes including WordPress


Yeah, in large projects that span a number of developers I agree with you. In a project that only I will ever touch? Like my personal blog? No way am I not going to reach for the most powerful featurea of a language. That sounds like exactly the right place to experiment with them.


> With Jekyll I can write "_plugins/foo.rb" and put any code in there to add new Liquid template tags

To be fair, Hugo's shortcodes are similar to this without requiring a plugin. And with render hooks and `.Scratch` to temporarily store information, it gets you a long way. It takes some time and experimentation to understand these abilities, however, and the documentation is not always helpful, to say the least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: