Skip to content

This Jekyll plugin generates a page for each row of the specified data files.

License

Notifications You must be signed in to change notification settings

webisland/jekyll-data-pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jekyll-data-pages v1.1.0

This Jekyll plugin generates a page for each row of the specified data files.

Instalation

Add the jekyll-data-pages gem to the :jekyll-plugins group in your Gemfile:

group :jekyll_plugins do
  gem 'jekyll-data-pages', 'https://github.com/webisland/jekyll-data-pages'
end

Usage

Put a data file in Jekyll data folder.
Example list.csv:

id,title,description,type
1,"First item","First item description",1
2,"Second item","Second item description",2

Specify data files to generate pages in _config.yml.

data_pages:
  - dataset: list
    permalink: /list/:id/
    layout: list_item
    exclude:
      type: [2]

Create a layout in _layouts/. The page data properties are associated with page.data hash.
Example _layouts/list_item.html:

<div>
  <span>{{ page.data.id }}</span>
  <span>{{ page.data.title }}</span>
  <span>{{ page.data.description }}</span>
  <span>{{ page.data.type }}</span>
</div>

Versioning

This project uses semantic versioning.

License

This software is licensed under the MIT License.

About

This Jekyll plugin generates a page for each row of the specified data files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages