lib/amber/site.rb
def short_paths
      @short_paths ||= begin
        hash = {}
        pages_in_path_depth_order.each do |record|
          page = record[:page]
          path = record[:path]
          next if path.length == 1
          path_prefix = path.dup
          path.length.times do |depth|
            path_prefix.shift
            path_str = path_prefix.join('/')
            if @pages_by_path[path_str].nil? && hash[path_str].nil?
              hash[path_str] = page
            end
          end
        end
        # debug:
        #hash.each do |path, record|
        #  puts "#{record[:page].path.join('/')} => #{record[:path].join('/')}"
        #end
        hash
      end
    end
def short_paths
      @short_paths ||= begin
        hash = {}
        pages_in_path_depth_order.each do |record|
          page = record[:page]
          path = record[:path]
          next if path.length == 1
          path_prefix = path.dup
          path.length.times do |depth|
            path_prefix.shift
            path_str = path_prefix.join('/')
            if @pages_by_path[path_str].nil? && hash[path_str].nil?
              hash[path_str] = page
            end
          end
        end
        # debug:
        #hash.each do |path, record|
        #  puts "#{record[:page].path.join('/')} => #{record[:path].join('/')}"
        #end
        hash
      end
    end
returns a hash containing all the automatically determined shortest paths for every page.
 the data structure looks like so:

 {
   "ddd" => <page 'bbb/ddd'>,
   "ccc" => <page 'bbb/ccc'>,
   "red" => <page 'autoalias/red'>,
   "blue"=> <page 'autoalias/blue'>,
   "red/blue" => <page 'autoalias/red/blue'>
 }

 short_paths does not include the normal paths or normal aliases, just the automatic short path aliases.