lib/nanoc/base/source_data/site.rb in nanoc-4.0.0a1 vs lib/nanoc/base/source_data/site.rb in nanoc-4.0.0a2

- old
+ new

@@ -174,10 +174,11 @@ def setup_child_parent_links teardown_child_parent_links item_map = {} @items.each do |item| + next if item.identifier !~ /\/\z/ item_map[item.identifier.to_s] = item end @items.each do |item| parent_id_end = item.identifier.to_s.rindex('/', -2) @@ -322,15 +323,15 @@ @items_loaded ||= false return if @items_loaded @items_loaded = true # Get items - @items = Nanoc::Int::ItemArray.new + @items = Nanoc::Int::ItemArray.new(@config) data_sources.each do |ds| items_in_ds = ds.items items_in_ds.each do |i| - i.identifier = Nanoc::Identifier.new(File.join(ds.items_root, i.identifier.to_s)) + i.identifier = i.identifier.prefix(ds.items_root) i.site = self end @items.concat(items_in_ds) end end @@ -344,10 +345,10 @@ # Get layouts @layouts = [] data_sources.each do |ds| layouts_in_ds = ds.layouts layouts_in_ds.each do |l| - l.identifier = Nanoc::Identifier.new(File.join(ds.layouts_root, l.identifier.to_s)) + l.identifier = l.identifier.prefix(ds.layouts_root) end @layouts.concat(layouts_in_ds) end end