From 7e1cc4b684f2a282f38155d5b3a9df8e66fd3dfa Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 26 Aug 2014 23:20:27 -0700 Subject: [PATCH] Add Site#in_source_dir --- lib/jekyll/site.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 59917e35..76f2f780 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -91,6 +91,13 @@ module Jekyll end end + # Public: Prefix a given path with the source directory. + # + # Returns a path which is prefixed with the source directory. + def in_source_dir(path) + Jekyll.sanitized_path(source, path) + end + # The list of collections and their corresponding Jekyll::Collection instances. # If config['collections'] is set, a new instance is created for each item in the collection. # If config['collections'] is not set, a new hash is returned.