anchor.diff:                  [Else, App, NMod, string:substr(Sum, 1, 50)]
           end,
   
  -    Index = lists:sort( fun(X, Y) -> sort_index(X, Y) end,
  -                        [ F(X) || X <- FIndex ] ),
  +    Index = lists:sort(fun sort_index/2, lists:map(F, FIndex)),
       Js    = fmt("var index = ~p;", [Index]),
   
       ok = file:write_file([dest(Conf), "/erldocs_index.js"], Js).
  
positive.code:     log("Creating index.html ...~n"),
  
      Html = "<h1>Module Index</h1><hr /><br /><div>"
          ++ xml_to_str(emit_apps([X || X = ["mod"|_] <- lists:sort(Index)]))
          ++ "</div>",
  
      Args = [{base,    "./"},
  
negative.code:     ok = file:write_file([dest(Conf), "/index.html"],
                           file_tpl(Args, load_tpl(Conf))).
  
  emit_index(L) ->
      lists:flatmap(
        fun index_html/1,
        lists:sort(fun sort_index/2, L)).
  
  index_html(["app", App, _, _Sum]) ->
      [{a, [{name, App}], []}, {h1, [], [App]}];
  index_html(["mod", App, Mod, Sum]) ->
      Url = App ++ "/" ++ Mod ++ ".html",
      [{p,[], [{a, [{href, Url}], [Mod]}, {br,[],[]}, Sum]}];
  index_html(_) ->
      [].
  
  type_ordering("app") -> 1;
  type_ordering("mod") -> 2;
  