require_relative './nested_blog_data_source'

Class.new(NestedBlogDataSource) do
  identifier :business_blog

  # TODO: should we use {Nanoc::CodeSnippet} ?
  # see {Nanoc::CodeSnippet} in {Nanoc::Site#load_code_snippets}
  def up
    @site.config[:business_blog_config] = config
    lib_dir = File.expand_path('business-blog/lib', BLOG_ROOT)

    Dir["#{lib_dir}/**/*.rb"].sort.each do |lib|
      require lib
    end
  end
end
