From 0ae3d0adc3f3f0b9b1c0b35a96332f716416e09c Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Tue, 2 Aug 2016 15:58:14 -0700 Subject: [PATCH] Use #{site.source}/#{pages_dir} instead of just #{pages_dir} --- _plugins/jekyll-pages-directory.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_plugins/jekyll-pages-directory.rb b/_plugins/jekyll-pages-directory.rb index 29d049f..94aa8db 100644 --- a/_plugins/jekyll-pages-directory.rb +++ b/_plugins/jekyll-pages-directory.rb @@ -2,12 +2,12 @@ module Jekyll class PagesDirGenerator < Generator def generate(site) pages_dir = site.config['pages'] || './_pages' - all_raw_paths = Dir["#{pages_dir}/**/*"] + all_raw_paths = Dir["#{site.source}/#{pages_dir}/**/*"] all_raw_paths.each do |f| - if File.file?(File.join(site.source, '/', f)) + if File.file?(f) filename = f.match(/[^\/]*$/)[0] - clean_filepath = f.gsub(/^#{pages_dir}\//, '') + clean_filepath = f.gsub(/^#{site.source}\/#{pages_dir}\//, '') clean_dir = extract_directory(clean_filepath) site.pages << PagesDirPage.new(site,