đź”§ 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:
- Removed
old-version/from exclude list in_config.yml - Added
keep_files: [old-version]to preserve the folder - Manually copied folder to
_sitedirectory - Old version is now accessible at
/old-version/index.html
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:
- Added theme toggle button to
index.htmlnavigation - Added theme toggle button to
Blog.htmlnavigation - Added
performance.jsscript to both pages - Theme toggle now fully functional on all pages
Changes Made
Files Updated
- _config.yml
- Added
keep_files: [old-version] - Removed
old-version/from exclude list
- Added
- index.html
- Added theme toggle button to navigation
- Added
performance.jsscript
- Blog.html
- Added theme toggle button to navigation
- Added
performance.jsscript
- assets/js/projects-data.js
- Replaced missing image paths with SVG data URIs
- Eliminated all 404 errors for project images
Files Already Correct
_includes/navigation.html- Already had theme toggleassets/js/modern.js- Theme logic already implementedassets/css/modern.css- Dark mode styles already present_layouts/default.html- Using includes correctly
Current Status
âś… Working Features
- Old Version Access
- Link: http://localhost:4000/old-version/index.html
- All old files accessible
- Original design preserved
- 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
- 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
Test Old Version Link
- Go to http://localhost:4000
- Click “🕰️ Old Version” in navigation
- Should load original blog design
- Should work without 404 errors
Test Theme Toggle
- Go to any page
- Look for moon/sun icon in top-right navigation
- Click to toggle between light/dark modes
- Refresh page - mode should persist
- 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:
- Old version uses Handlebars templating
- Jekyll tries to parse them as Liquid
- Generates warnings but doesn’t break functionality
- Old version still works perfectly
Server Status
âś“ Server Running: http://127.0.0.1:4000/
âś“ Auto-regeneration: Enabled
âś“ No blocking errors
âś“ All features functional
Both issues are now resolved! 🎉