Skip to 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)

  • Automatically extracts theme version from gem specification (no hardcoding!)
  • Displays comprehensive system information:
  • Theme name, repository, and version
  • Jekyll and Ruby versions
  • Build environment and timestamp
  • Active plugins
  • Technology stack
  • Site details
  • Provides helpful links to:
  • Theme documentation
  • Changelog
  • Issue tracker
  • Discussions

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

  • Runs during Jekyll build process
  • Scans for installed Jekyll theme gems
  • Extracts version from Gem::Specification
  • Makes version data available as site.theme_specs
  • Handles both local gem and remote themes
  • Logs version information during build

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

  • Added theme-info component to existing settings modal
  • Maintains all existing functionality (breadcrumbs, search, dev shortcuts, dark mode)
  • Added "Info" button to footer for easy access
  • Joins existing "Powered by" technologies list
  • Opens the settings modal with theme information

5. Documentation (docs/THEME_VERSION_FEATURE.md)

  • Complete feature documentation
  • Usage instructions for theme users
  • Developer guide for customization
  • Troubleshooting section

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
  1. Check build logs for theme version output:
ThemeVersion: jekyll-theme-zer0 v0.5.0 (gem)
  1. Access the info modal:
  2. Click the gear icon (βš™οΈ) in the header
  3. Or click "Info" in the footer

  4. Verify display:

  5. Theme version shows correctly
  6. Jekyll version matches your environment
  7. Links work properly
  8. 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:

  • ✨ NEW: _includes/components/theme-info.html (Display template)
  • ✨ NEW: _plugins/theme_version.rb (Version extraction)
  • ✨ NEW: docs/THEME_VERSION_FEATURE.md (Documentation)
  • πŸ“ UPDATED: _includes/components/info-section.html (Modal integration)
  • πŸ“ UPDATED: _includes/core/footer.html (Info button)

it-journey Repository:

  • βœ… NO CHANGES NEEDED (Feature works automatically!)

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:

  • Version comparison (current vs latest available)
  • Update notifications
  • Inline changelog display
  • Theme configuration preview
  • Deprecation warnings

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