Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

A Jekyll monkey-patch to allow you to use variables within your _config.yml file.

Notifications You must be signed in to change notification settings

gjtorikian/jekyll-config-variables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Jekyll monkey-patch to allow you to use variables within your _config.yml file.

Resources

Stars

Watchers

Forks

Packages