     end
   end
 
-  @spec clean_dest(String.t) :: :ok
-  defp clean_dest(dest) do
-    File.mkdir_p! "#{dest}"
-    IO.puts "Created directory `#{dest}`."
+  @spec compile_nav() :: :ok
 
-    # exclude dotfiles so that git repository is not blown away
-    dest |> File.ls!
-         |> Enum.filter(&(not String.starts_with?(&1, ".")))
-         |> Enum.map(&("#{dest}#{&1}"))
-         |> Enum.each(&File.rm_rf!(&1))
+  defp compile_nav do
+    IO.puts "Compiling main navigation HTML stub..."
+    template = BuildDataStorage.get self(), "template", "nav"
+    html = Renderer.render template, []
+    BuildDataStorage.put self(), "navstub", html
   end
 
   @spec launch_tasks(build_mode, String.t, String.t) :: Error.result
+
   defp launch_tasks(:parallel, src, dest) do
     IO.puts "⚡️  \x1b[1mStarting parallel build...\x1b[0m"
     t1 = Task.async fn -> PageBuilder.run src, dest, :parallel end

  end

  @spec try_copy(String.t, String.t) :: :ok
  defp try_copy(src, dest) do
    case File.cp_r src, dest do
      {:error, reason, _} ->

  @type compiled_template :: tuple

  @spec build(String.t, String.t, build_mode) :: Error.result(String.t)

  def build(src, dest, mode) do
    case check_access dest do
      :ok -> do_build_stage1 src, dest, mode
