In order to test a private plugin, I created a _plugins folder in the root of my project.
- I copied an existing plugin (jekyll-leaflet) in this folder, that will be my future private plugin;
- I removed jekyll-leaflet from the Gemfile file;
- I didn’t change the _config.yml file.
Now I have plugins defined in gemfile file and in _plugins folder.
Is it correct ? because I have a dependency error !
jekyll build JEKYLL_ENV=production
Dependency Error: Yikes! It looks like you don’t have /home/jpc/faune_flore_meyrin/_plugins/lib/jekyll-leaflet.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. If you’ve run Jekyll with
bundle exec, ensure that you have included the /home/jpc/faune_flore_meyrin/_plugins/lib/jekyll-leaflet.rb gem in your Gemfile as well. The full error message from Ruby is: ‘cannot load such file – jekyll-leaflet/leaflet-map’ If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Shall I also declare my plugin in Gemfile ?
In my _config.yml:
plugins: - jekyll-feed - jekyll-include-cache - jekyll-paginate - jekyll-sitemap - jekyll-exif-data - html-proofer - jekyll-leaflet - jekyll-email-protect
My _plugins folder:
│ ├── filters
│ │ └── replace-hrefs.rb
│ ├── leaflet-items
│ │ ├── leaflet-geojson.rb
│ │ └── leaflet-marker.rb
│ ├── leaflet-map.html
│ ├── leaflet-map.js
│ ├── leaflet-map.rb
│ ├── leaflet-providers.js
│ ├── leaflet-providers-license.md
│ └── _parse-liquid.rb