Skip to main content

Theme Version Display Implementation Summary

What Was Implemented

A complete automatic theme version display system for the zer0-mistakes Jekyll theme that shows version information and system details accessible from any page.

Key Components Created

1. Theme Information Display (_includes/components/theme-info.html)

2. Version Extraction Plugin (_plugins/theme_version.rb)

3. Modal Integration (Updated _includes/components/info-section.html)

5. Documentation (docs/THEME_VERSION_FEATURE.md)

How It Works

┌─────────────────────────────────────────────────────────────┐
│                    Jekyll Build Process                      │
├─────────────────────────────────────────────────────────────┤
│                                                               │
│  1. Plugin Executes (_plugins/theme_version.rb)              │
│     ├─ Scans for jekyll-theme-* gems                        │
│     ├─ Extracts version from Gem::Specification             │
│     ├─ Handles remote_theme gracefully                       │
│     └─ Populates site.theme_specs array                     │
│                                                               │
│  2. Template Renders (_includes/components/theme-info.html)  │
│     ├─ Reads site.theme_specs data                          │
│     ├─ Displays version (or "Latest" for remote)            │
│     ├─ Shows Jekyll/Ruby versions                           │
│     ├─ Lists active plugins                                  │
│     └─ Provides documentation links                         │
│                                                               │
│  3. User Access Points                                        │
│     ├─ Header: Gear icon (⚙️) button                        │
│     ├─ Footer: "Info" button                                │
│     └─ Opens modal with all information                     │
│                                                               │
└─────────────────────────────────────────────────────────────┘

Benefits

Zero Hardcoding: Version pulled automatically from gemspec
Always Accurate: Reflects actual installed theme version
User-Friendly: Accessible from any page via header/footer
Comprehensive: Full system and environment information
Maintainable: Single source of truth (version.rb)
Helpful: Links to docs, changelog, support
GitHub Pages Compatible: Works with remote_theme

Testing

To test this feature:

  1. Build the site:

    bundle exec jekyll serve
    
  2. Check build logs for theme version output:

    ThemeVersion: jekyll-theme-zer0 v0.5.0 (gem)
    
  3. Access the info modal:
    • Click the gear icon (⚙️) in the header
    • Or click “Info” in the footer
  4. Verify display:
    • Theme version shows correctly
    • Jekyll version matches your environment
    • Links work properly
    • Modal closes correctly

For it-journey Site

The it-journey site will automatically get this feature because it uses:

remote_theme: "bamr87/zer0-mistakes"

When GitHub Pages builds the site, it will:

  1. Pull the latest zer0-mistakes theme
  2. Run the theme_version.rb plugin
  3. Display “Remote (Latest)” for the version
  4. Show all system information in the modal

No changes needed to the it-journey repository!

Version Management

For Theme Developers (zer0-mistakes):

Update version in ONE place:

# lib/jekyll-theme-zer0/version.rb
module JekyllThemeZer0
  VERSION = "0.5.0"  # ← Only change here!
end

For Theme Users (it-journey):

No configuration needed! Version displays automatically.

Files Modified/Created

zer0-mistakes Repository:

it-journey Repository:

Next Steps

  1. Test locally in zer0-mistakes repo
  2. Commit and push to GitHub
  3. Verify on it-journey site after theme updates
  4. Optional: Add to theme README for user visibility

Future Enhancements

Consider adding:


Result: A professional, maintainable, and user-friendly way to display theme version information that requires zero configuration and zero hardcoding! 🎉