xinzhi / jekyll-data-example

Home Page:https://billraymond.github.io/jekyll-data-example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Working with Jekyll Data example project

This repo is part of my Working with GitHub Pages and Jekyll video series on YouTube.

Working with Jekyll Data: Part 1 - Overview Working with Jekyll Part 2: Using built-in Jekyll data Working with Jekyll Part 3: Custom data

This is a vanilla Jekyll website using the default minima theme. The site is published using GitHub Pages here. Just click the two links when you visit the site.

https://billraymond.github.io/jekyll-data-example/

Using built-in Jekyll data

In the root folder of this repo, locate the jekyll-data.html file. In there you will learn how to:

  • Access blog posts and related metadata
  • Access pages and related metadata
  • Access the _config.yml file

Using custom Jekyll data

Jekyll allows you to access data from CSV, TSV, JSON, and YAML (YML) files. In the root of this folder, ocate the custom-data.html file. In there, you will learn how to:

  • Access data from a CSV file
  • Access data from a TSV file
  • Access data from a JSON file
  • Access data from a YML file

In the root folder of this repo, locate the _data folder and you will find examples of each file type that the custom-data.html reads from.

About

https://billraymond.github.io/jekyll-data-example/

License:MIT License


Languages

Language:HTML 78.2%Language:SCSS 17.5%Language:Ruby 4.3%