Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Jekyll monkey-patch to allow you to use variables within your _config.yml file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

>= 2.0
 Project Readme

jekyll-verison-helper

This gem lets you define variables within a _config.yml file and refer to it through the same file.

To do that, first, create a key called variables, and populate it with any set of variable names you like:

variables:
  latest_version: "2.0"

In this case, a new variable called latest_version is available to use, and it's defined a "2.0". You can use this variable throughout your YAML file with the %{...} notation. For example:

defaults:
  -
    scope:
      path: ""
      type: "source"
      values:
        version: "%{latest_version}"

This sets a frontmatter of version on all the files in the source collection. It uses whatever value is defined in latest_version to set that up.