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.