Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Use ERB and SafeYAML to interpolate jekyll_get configuration #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion jekyll_get.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class Generator < Jekyll::Generator
priority :highest

def generate(site)
config = site.config['jekyll_get']
config = SafeYAML.load(
ERB.new(site.config['jekyll_get'].to_yaml).result(binding)
)
if !config
return
end
Expand Down