SpicyNoodles - Jekyll + GitHub Pages Setup

This is a Jekyll-based website optimized for GitHub Pages with dynamic product management using Liquid templating and YAML data files.

🎨 Features

πŸ“ Project Structure

spicynoodles/
β”œβ”€β”€ _config.yml           # Jekyll configuration & brand variables
β”œβ”€β”€ _data/
β”‚   └── products.yml      # Product database (single source of truth)
β”œβ”€β”€ _layouts/
β”‚   β”œβ”€β”€ default.html      # Base layout
β”‚   β”œβ”€β”€ product-list.html # Products listing page
β”‚   └── product.html      # Individual product page
β”œβ”€β”€ _includes/            # Reusable components
β”œβ”€β”€ products/
β”‚   β”œβ”€β”€ index.md          # Products listing
β”‚   β”œβ”€β”€ current-hot-spicy-noodles/
β”‚   β”‚   β”œβ”€β”€ index.md      # Product detail page
β”‚   β”‚   └── image.png     # Product image
β”‚   β”œβ”€β”€ current-2x-spicy-noodles/
β”‚   β”œβ”€β”€ current-schezwan-instant-noodles/
β”‚   └── current-hot-n-lemon-veggie-soup-noodles/
β”œβ”€β”€ index.md              # Home page
β”œβ”€β”€ Gemfile               # Ruby dependencies
└── JEKYLL_README.md      # This file

πŸš€ Quick Start - Local Development

Prerequisites

Install Dependencies

cd spicynoodles
bundle install

Run Local Server

bundle exec jekyll serve

Visit http://localhost:4000 to see your site.

πŸ“ Managing Products

Add/Edit Products

  1. Open _data/products.yml
  2. Add or modify product entries
  3. Jekyll automatically regenerates the site
products:
  - id: 5
    title: "New Product Name"
    folder: "new-product-folder"
    brandName: "Yashoda Foods"
    price: 3.00
    heatLevel: 4
    available: true
    # ... more fields

Create Product Page

For a new product:

  1. Create folder: products/new-product-folder/
  2. Create products/new-product-folder/index.md with front matter
  3. Add product image at products/new-product-folder/image.png

🎨 Customize Brand Colors

Edit _config.yml to change brand colors:

brand:
  chili_red: "#D0290A"
  deep_chili: "#8C1A04"
  # ... more colors

These variables are available in all Liquid templates as site.brand.chili_red, etc.

🌐 Deploy to GitHub Pages

  1. Push to GitHub repository
  2. Go to Settings β†’ Pages
  3. Set source to main branch
  4. GitHub automatically builds and deploys

Option 2: Build & Commit _site

bundle exec jekyll build
git add _site/
git commit -m "Build site"
git push

πŸ”§ Liquid Templating Basics

Accessing Product Data


  Current Hot & Spicy Noodles
  1.0
  4

  Current 2x Spicy Noodles
  1.0
  5

  Current Schezwan Instant Noodles
  1.0
  3

  Current Hot 'n' Lemon Veggie Soup Noodles
  1.0
  3

Conditional Rendering


  Out of Stock

Loops


πŸ“Š Performance Benefits

πŸ”„ Workflow

  1. Edit _data/products.yml with product data
  2. Test locally with bundle exec jekyll serve
  3. Commit & Push to GitHub
  4. GitHub Pages automatically builds and deploys
  5. Live within seconds

πŸ› Troubleshooting

Site doesn’t build

bundle exec jekyll clean
bundle exec jekyll build --verbose

CSS not loading

Products not showing

πŸ“š Resources

🎯 Next Steps


Ready to go live? Push to GitHub and your Jekyll site will automatically deploy! πŸš€