A plugin to read '_config.yml' and data files within Jekyll theme gems
The JekyllDataGem is a plugin that allows users to read data files within Jekyll theme-gems and incorporate the extracted data into the site’s internal data hash. This plugin provides a solution to the challenge of using configuration settings and data files within theme-gems, allowing them to be used in templates and work out-of-the-box with minimal user intervention.
To install the JekyllDataGem plugin, add it to your site’s Gemfile and config file, similar to other Jekyll plugin gems. Make sure the plugin is included in the :jekyll_plugins group in the Gemfile to avoid overriding data from the theme-gem. Here are the steps:
group :jekyll_plugins do
gem "jekyll-data"
end
plugins:
- jekyll-data
bundle install
Note: If the plugin is marked as a runtime_dependency by the theme-gem’s author, it will be installed automatically when installing the theme-gem. However, it is recommended to add the plugin to the :jekyll_plugins group in the Gemfile to avoid overriding theme-gem data.
The JekyllDataGem plugin enables users to read and incorporate data files and configuration settings within Jekyll theme-gems. By adding the plugin to the Gemfile and config file, the plugin allows data files within the _data directory and the _config.yml file within the theme-gem to contribute to the site’s internal data hash and configuration hash, respectively. This plugin solves the challenge of using theme-gem data and configuration settings in Jekyll themes, allowing them to work seamlessly with minimal user intervention.