A lightweight Jekyll plugin that injects useful build-time metadata (Jekyll version, environment, Ruby version, etc.) into Liquid templates.
site.meta.jekyll_version
site.meta.jekyll_major_version
(integer)site.meta.environment
(e.g., development
, production
)site.meta.ruby_version
Add to your Gemfile:
group :jekyll_plugins do
gem "jekyll-meta"
end
Bundle install:
bundle install
Enable the plugin in your _config.yml
:
plugins:
- jekyll-meta
Rebuild your site:
bundle exec jekyll build
Use the following Liquid variables anywhere in your templates, pages, or posts:
Jekyll version:
Major version:
Environment:
Ruby version:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jekyll-meta-plugin</title>
</head>
<body>
<footer>
<p>Built with Jekyll v (v)</p>
<p>Environment: </p>
<p>Ruby: </p>
</footer>
</body>
</html>
No additional configuration is required. The plugin works out of the box once enabled.
>= 3.0
, < 5.0
>= 2.7
Contributions, issues, and feature requests are welcome!
git checkout -b feature/my-feature
)git commit -m 'Add some feature'
)git push origin feature/my-feature
)Please ensure all tests pass and follow the existing code style.
Licensed under the MIT License. See LICENSE for details.