       {:error, reason} -> {:error, {reason, path, 0}}
       {:ct_error, msg, line} -> {:error, {msg, path, line}}
     end
-  end
-
-  @spec render_includes(Error.result({binary, Macro.t}), state)
-    :: Error.result({binary, binary})
-
-  defp render_includes({:ok, {name, ast}}, state) do
-    case Renderer.render_stub ast, state.site_ctx, name do
-      {:ok, html} -> {:ok, {name, html}}
-      {:error, _} = error -> error
-    end
-  end
-
-  defp render_includes(error = {:error, _}, _state) do
-    error
   end
 
   @doc """

        |> Stream.filter(&String.ends_with?(&1, ".html.eex"))
        |> Stream.map(&String.replace_suffix(&1, ".html.eex", ""))
        |> Stream.map(&do_load_includes(&1, state))
        |> Enum.map(&render_includes(&1, state))
        |> Error.filter_results_with_values(:load_includes)
      case result do
        {:ok, list} -> {:ok, Map.put(state, :includes, Map.new(list))}

  end

  @doc """
  Reads, compiles and preprocesses the includable templates.

  May return a new state object with compiled includable templates.
  """
  @spec load_includes(state) :: Error.result(state)

