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)
4. Footer Access Point (Updated _includes/core/footer.html)¶
- 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:
- Build the site:
- Check build logs for theme version output:
- Access the info modal:
- Click the gear icon (βοΈ) in the header
-
Or click "Info" in the footer
-
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:
When GitHub Pages builds the site, it will:
- Pull the latest zer0-mistakes theme
- Run the theme_version.rb plugin
- Display "Remote (Latest)" for the version
- 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¶
- Test locally in zer0-mistakes repo
- Commit and push to GitHub
- Verify on it-journey site after theme updates
- 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! π