🎨 Code Syntax Highlighting - Color Test

✅ Syntax Highlighting Configured
Theme: Gruvbox Dark
Highlighter: Rouge
Background: #1a1b21 (Dark Charcoal)

📋 Color Legend

Keywords
function, const, if, for, class
Strings
"Hello", 'World', `template`
Comments
// comment, /* block */
Numbers
42, 3.14, 0xFF
Functions
console.log, insertMany
Classes/Types
MyClass, String, Array

Example 1: JavaScript/MongoDB

This is how your MongoDB code will appear:

/* Ordered insert - stops on first error */
db.moviesScratch.insertMany([
  {
    "_id": "tt0084726",
    "title": "Star Trek II: The Wrath of Khan",
    "year": 1982,
    "type": "movie"
  }
]);

Example 2: Python

This is how your Python code will appear:

import re

# Create text with whitespace
text_data = [' Hello ', ' World ']

# Strip whitespaces
strip_whitespace = [string.strip() for string in text_data]
print(strip_whitespace)

Example 3: Bash

This is how your shell commands will appear:

# Install command line tools
xcode-select --install

# Verify installation
xcode-select -p

✅ How to Verify Colors Are Working on Your Site

  1. Build your site: bundle exec jekyll serve
  2. Open a post: Navigate to any of the fixed posts
  3. Check code blocks: You should see multiple colors, not just white/gray
  4. Right-click code: Inspect element and look for <span class="k"> tags

🔍 Quick Visual Check

WITHOUT highlighting: All code appears in one color (white/gray)

WITH highlighting: You see red keywords, green strings, purple numbers, brown comments!

🎯 Posts That Now Have Color

🚨 Troubleshooting: If You Don't See Colors

  1. Hard refresh: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
  2. Clear Jekyll cache: bundle exec jekyll clean
  3. Check browser console: Look for CSS loading errors
  4. Verify code blocks: Make sure posts use ```language format