From f9db7d9032d7dcb2357a93298b7d47dae6269cbc Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Thu, 23 May 2024 23:24:32 +0200 Subject: [PATCH] change path again --- docs/buildutils/redirect_generation.jl | 4 ++-- docs/makedocs.jl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/buildutils/redirect_generation.jl b/docs/buildutils/redirect_generation.jl index e9e4d5ec981..3fefd8aee96 100644 --- a/docs/buildutils/redirect_generation.jl +++ b/docs/buildutils/redirect_generation.jl @@ -1,5 +1,5 @@ function generate_redirects(rules; dry_run = true) - htmlpaths = cd("../build/final_site") do + htmlpaths = cd(joinpath("build", "final_site")) do collect(Iterators.flatmap(walkdir(".")) do (root, dirs, files) (chop(joinpath(root, file), head = 1, tail = 0) for file in files if endswith(file, ".html")) end) @@ -34,7 +34,7 @@ function write_redirection_html(redirect_file, existing_file; dry_run) @info "Adding redirect from $redirect_file to $existing_file" if !dry_run - cd("../build/final_site") do + cd(joinpath("build", "final_site")) do filepath = "." * redirect_file mkpath(splitdir(filepath)[1]) open(filepath, "w") do io diff --git a/docs/makedocs.jl b/docs/makedocs.jl index e6acfd21f5d..ec98e7d0366 100644 --- a/docs/makedocs.jl +++ b/docs/makedocs.jl @@ -180,7 +180,9 @@ Documenter.makedocs(; @show pwd() run(`ls`) +println() run(`ls ..`) +println() cd(@__DIR__) generate_redirects([