def read_directories(dir = "")
      base = site.in_source_dir(dir)

      return unless File.directory?(base)

      dot_dirs = []
      dot_pages = []
      dot_static_files = []

      dot = Dir.chdir(base) { filter_entries(Dir.entries("."), base) }
      dot.each do |entry|
        file_path = @site.in_source_dir(base, entry)
        if File.directory?(file_path)
          dot_dirs << entry
        elsif Utils.has_yaml_header?(file_path)
          dot_pages << entry
        else
          dot_static_files << entry
        end
      end

      retrieve_posts(dir)
      retrieve_dirs(base, dir, dot_dirs)
      retrieve_pages(dir, dot_pages)
      retrieve_static_files(dir, dot_static_files)
    end
def read_directories(dir = "")
      base = site.in_source_dir(dir)

      return unless File.directory?(base)

      dot_dirs = []
      dot_pages = []
      dot_static_files = []

      dot = Dir.chdir(base) { filter_entries(Dir.entries("."), base) }
      dot.each do |entry|
        file_path = @site.in_source_dir(base, entry)
        if File.directory?(file_path)
          dot_dirs << entry
        elsif Utils.has_yaml_header?(file_path)
          dot_pages << entry
        else
          dot_static_files << entry
        end
      end

      retrieve_posts(dir)
      retrieve_dirs(base, dir, dot_dirs)
      retrieve_pages(dir, dot_pages)
      retrieve_static_files(dir, dot_static_files)
    end
Recursively traverse directories to find pages and static files
 that will become part of the site according to the rules in
 filter_entries.

 dir - The String relative path of the directory to read. Default: ''.

 Returns nothing.