lib/jekyll/page.rb in jekyll-3.2.1 vs lib/jekyll/page.rb in jekyll-3.3.0.pre.rc1
- old
+ new
@@ -38,10 +38,14 @@
def initialize(site, base, dir, name)
@site = site
@base = base
@dir = dir
@name = name
- @path = site.in_source_dir(base, dir, name)
+ @path = if site.in_theme_dir(base) == base # we're in a theme
+ site.in_theme_dir(base, dir, name)
+ else
+ site.in_source_dir(base, dir, name)
+ end
process(name)
read_yaml(File.join(base, dir), name)
data.default_proc = proc do |_, key|