lib/nanoc/base/source_data/site.rb in nanoc-4.0.0b1 vs lib/nanoc/base/source_data/site.rb in nanoc-4.0.0b2

- old
+ new

@@ -22,26 +22,28 @@ # configuration overrides these options. DEFAULT_DATA_SOURCE_CONFIG = { type: 'filesystem_unified', items_root: '/', layouts_root: '/', - config: {} + config: {}, + identifier_type: 'full', } # The default configuration for a site. A site's configuration overrides # these options: when a {Nanoc::Int::Site} is created with a configuration # that lacks some options, the default value will be taken from # `DEFAULT_CONFIG`. DEFAULT_CONFIG = { - text_extensions: %w( css erb haml htm html js less markdown md php rb sass scss txt xhtml xml coffee hb handlebars mustache ms slim ).sort, + text_extensions: %w( css erb haml htm html js less markdown md php rb sass scss txt xhtml xml coffee hb handlebars mustache ms slim rdoc ).sort, lib_dirs: %w( lib ), commands_dirs: %w( commands ), output_dir: 'output', data_sources: [{}], index_filenames: ['index.html'], enable_output_diff: false, - prune: { auto_prune: false, exclude: ['.git', '.hg', '.svn', 'CVS'] } + prune: { auto_prune: false, exclude: ['.git', '.hg', '.svn', 'CVS'] }, + string_pattern_type: 'glob', } # Creates a site object for the site specified by the given # `dir_or_config_hash` argument. # @@ -323,11 +325,11 @@ @items_loaded ||= false return if @items_loaded @items_loaded = true # Get items - @items = Nanoc::Int::ItemArray.new(@config) + @items = Nanoc::Int::IdentifiableCollection.new(@config) data_sources.each do |ds| items_in_ds = ds.items items_in_ds.each do |i| i.identifier = i.identifier.prefix(ds.items_root) i.site = self @@ -341,10 +343,10 @@ @layouts_loaded ||= false return if @layouts_loaded @layouts_loaded = true # Get layouts - @layouts = [] + @layouts = Nanoc::Int::IdentifiableCollection.new(@config) data_sources.each do |ds| layouts_in_ds = ds.layouts layouts_in_ds.each do |l| l.identifier = l.identifier.prefix(ds.layouts_root) end