From bc678c86bee60141222cb81636609572b86b0ca5 Mon Sep 17 00:00:00 2001 From: Robin North Date: Thu, 29 Mar 2018 17:41:48 +0100 Subject: [PATCH] Respect `includes_dir` site config variable --- lib/jekyll-youtube.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll-youtube.rb b/lib/jekyll-youtube.rb index 03ebfcf..3a68231 100644 --- a/lib/jekyll-youtube.rb +++ b/lib/jekyll-youtube.rb @@ -17,7 +17,7 @@ def render(context) @youtube_id = $5 end - tmpl_path = File.join Dir.pwd, "_includes", "youtube.html" + tmpl_path = File.join context.registers[:site].in_source_dir(context.registers[:site].config["includes_dir"].to_s), "youtube.html" if File.exist?(tmpl_path) tmpl = File.read tmpl_path site = context.registers[:site] @@ -28,4 +28,4 @@ def render(context) end Liquid::Template.register_tag "youtube", self -end \ No newline at end of file +end