đź”§ Fixes Applied

đź”§ Fixes Applied

Issues Fixed

1. âś… Old Version Button 404 Error

Problem: Clicking “Old Version” button returned 404
Cause: Jekyll was excluding the old-version folder from the build
Solution:

2. âś… Theme Toggle Not Working

Problem: Dark/Light mode toggle button not appearing or functioning
Cause: Theme toggle button was only in _includes/navigation.html but index.html and Blog.html had hardcoded navigation
Solution:

Changes Made

Files Updated

  1. _config.yml
    • Added keep_files: [old-version]
    • Removed old-version/ from exclude list
  2. index.html
    • Added theme toggle button to navigation
    • Added performance.js script
  3. Blog.html
    • Added theme toggle button to navigation
    • Added performance.js script
  4. assets/js/projects-data.js
    • Replaced missing image paths with SVG data URIs
    • Eliminated all 404 errors for project images

Files Already Correct

Current Status

âś… Working Features

  1. Old Version Access
    • Link: http://localhost:4000/old-version/index.html
    • All old files accessible
    • Original design preserved
  2. Theme Toggle
    • Button appears in navigation (moon/sun icon)
    • Click to switch between light and dark modes
    • Saves preference to localStorage
    • Auto-detects system preference
    • Smooth transitions
  3. All Pages
    • Home page - âś… Theme toggle working
    • Blog page - âś… Theme toggle working
    • About page - âś… Uses layout (automatic)
    • Blog posts - âś… Uses layout (automatic)

How to Test

  1. Go to http://localhost:4000
  2. Click “🕰️ Old Version” in navigation
  3. Should load original blog design
  4. Should work without 404 errors

Test Theme Toggle

  1. Go to any page
  2. Look for moon/sun icon in top-right navigation
  3. Click to toggle between light/dark modes
  4. Refresh page - mode should persist
  5. Test on mobile - should work in hamburger menu

Known Warnings (Non-Critical)

The terminal shows Liquid syntax warnings from old-version files:

Liquid Warning: Liquid syntax error in old-version/Blog.html

These are harmless:

Server Status

âś“ Server Running: http://127.0.0.1:4000/
âś“ Auto-regeneration: Enabled
âś“ No blocking errors
âś“ All features functional

Both issues are now resolved! 🎉