0.05
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Import remote JSON data into the data for a Jekyll site
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.0
 Project Readme

jekyll-get-json

💎 Import remote JSON data into the data for a Jekyll site

Installation

  1. Use bundle add jekyll-get-json to add this to your site's Gemfile.
  2. Add this plugin to the plugins listed in your _config.yml file. For example:
    plugins:
      - jekyll-get-json
    

Usage

Add a jekyll_get_json section to your _config.yml file. This section should be an array of objects containing data and json properties:

  • The data property specifies where in the site.data you would like to put this data.
  • The json property is the remote URL of the JSON file.

To illustrate an example, assuming that you have a remote JSON file at https://example.com/data.json containing this:

{
  "bar": "Success!"
}

And you put the following into your _config.yml file:

jekyll_get_json:
  - data: foo
    json: 'https://example.com/data.json'

Then in your Jekyll site you will be able to use:

{{ site.data.foo.bar }}

And you will see:

Success!

Credit

This plugin is basically a more limited version of jekyll-get, duplicated here purely for the purposes of making it a Ruby gem.