limjh16 / jekyll-action-ts

:hammer: https://github.com/helaili/jekyll-action but without Docker
MIT License
42 stars 19 forks source link

Are _plugins ignored? #21

Closed lynxlynxlynx closed 2 years ago

lynxlynxlynx commented 2 years ago

Hey,

great plugin, recently migrated a project to it from Travis. I did now notice that the custom plugins in _plugins are not being used during the builds. Is this plugin not running jekyll manually? I'd expect such behaviour from a Github Actions build (hence we prebuild the site), not vanilla jekyll. Either way this little bit is not documented.

~EDIT: or perhaps something changed in jekyll, since incidently the port also meant a version bump. Investigating ...~

limjh16 commented 2 years ago

Hi, is it possible that you did not load your plugins in your _config.yml file? Refer to https://jekyllrb.com/docs/plugins/installation/ Sorry, I'm not too sure about this as I do not have any experience with custom plugins...

lynxlynxlynx commented 2 years ago

That shouldn't be needed, but I tried anyway — to no effect. I wonder if running jekyll through bundle imposes some constraints, but that would be odd as well.

woodcox commented 2 years ago

Hi

Plug-ins work for me when they are installed via the gemfile method. For example my gemfile is as follows:

source 'https://rubygems.org'

gem 'jekyll', "~> 4.2"

group :jekyll_plugins do gem 'jekyll-get-json' gem 'jekyll-liquify' gem 'jekyll-postcss' end

If you install them this way you don’t need to add the following to the _config file.

plugins:

I’ve not tried the other methods to load plugins.

woodcox commented 2 years ago

I’ve now tested it with adding custom .rb file in the _plugins directory. This also works.

One thing to note with the Jekyll plugin docs - the instructions are not 3 steps to follow but 3 different methods to add plugins.

If you have an .rb file just do option 1. If its a ruby gem follow option 2 or 3.

lynxlynxlynx commented 2 years ago

Turned out to be https://github.com/jekyll/jekyll/issues/5265, so nothing runner-specific.