     end
   end
 
-  @spec make_result([Page.t()], [Post.t()]) :: result()
-  defp make_result(pages, posts) do
-    alias Serum.GlobalBindings
-
-    pages = Enum.sort(pages, &(&1.order < &2.order))
-    posts = Enum.sort(posts, &(&1.raw_date > &2.raw_date))
-    tag_map = get_tag_map(posts)
-    tag_counts = Enum.map(tag_map, fn {k, v} -> {k, Enum.count(v)} end)
-
-    GlobalBindings.put(:all_pages, pages)
-    GlobalBindings.put(:all_posts, posts)
-    GlobalBindings.put(:all_tags, tag_counts)
-
-    %{pages: pages, posts: posts, tag_map: tag_map, tag_counts: tag_counts}
-  end
-
   @spec get_tag_map([Post.t()]) :: map()
   defp get_tag_map(all_posts) do
     all_tags =

    |> Task.async_stream(&process_post(&1, proj))
    |> Enum.map(&elem(&1, 1))
    |> Result.aggregate_values(:file_processor)
  end

  @spec process_post(Serum.File.t(), Proj.t()) :: Result.t(Post.t())

         page_task = Task.async(fn -> process_pages(page_files, proj) end),
         post_task = Task.async(fn -> process_posts(post_files, proj) end),
         {:ok, pages} <- Task.await(page_task),
         {:ok, posts} <- Task.await(post_task),
         tag_map = get_tag_map(posts),
         tag_counts = get_tag_counts(tag_map) do
      GlobalBindings.put(:all_pages, pages)
      GlobalBindings.put(:all_posts, posts)
      GlobalBindings.put(:all_tags, tag_counts)

      result = %{pages: pages, posts: posts, tag_map: tag_map, tag_counts: tag_counts}

      {:ok, result}
    else
      {:error, _} = error -> error
    end
